Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Oem to Ansi

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rastarizer - 27 Oct 2004 10:57 GMT
I got an OEM file and I use a StreamReader to read it but I got a problem
that the file may got some characters that StreamReader can not read so it
reads only some data of it.

eg.

Dim StreamToDisplay As New StreamReader("C:\OEMFILE.DAT", _
Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage))
Dim aLine As String
Do
 aLine = StreamToDisplay.ReadLine
TextBox1.Text += aLine + Chr(13) + Chr(10)
Loop Until aLine = Nothing
StreamToDisplay.Close()

When it ends then I see at the TextBox that the file is has not be read
right. I tried the FileOpen method but the same problem occured.
The encoding is correct cause when I open the OEMFILE.DAT through the
Notepad and simple save it with the same name then the StreamReader can read
it correct. But the point is that it must be done without the help of the
Notepad.

Any help ?
Jorge Serrano [MVP VB] - 27 Oct 2004 18:29 GMT
Hi Rastarizer,

I hope that this thread help you;
http://www.dotnet247.com/247reference/msgs/54/270997.aspx

Kind Regards,

Jorge Serrano Pérez
MVP VB.NET

> I got an OEM file and I use a StreamReader to read it but I got a problem
> that the file may got some characters that StreamReader can not read so it
[quoted text clipped - 19 lines]
>
> Any help ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.