Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm uesing such a code:

       Dim fs As New IO.FileStream(Application.StartupPath & "\tipofday.dat", IO.FileMode.Open)
       Dim fr As New IO.StreamReader(fs)
       Dim i As Integer
       Dim r As String
       For i = 0 To 100
           r = fr.ReadLine
           If r = "" Then TipCount = i : GoTo koniecczytaniatipów
           TipsOfDay(i) = r
       Next
koniecczytaniatipów:
       fr.Close() : fs.Close()

When it read form file, the text dosn't consist polish characters, what shell I do then?

 

I'm beging You... please help me....

Posted

that's a tough one i've never worked with that before...

have you looked into resources at all? you can change languages using a resource file

 

are the characters in ascii table? i guess not if you can't read...

 

i'm just kinda brainstorming... i'd look into Resource Files if i were

 

good luck

i'm not lazy i'm just resting before i get tired.
Posted

hm... I realy don't know what is wrong. I made a file with notepad and with polish special characters , set the ansii encodeing and save it. So every thing supose to work fine. I guess it's something with the streamreader. I've replace it with binaryreader and convert byte one by one it to string and it ok, the polish special characters are displayed properly.

 

by the way... I don't want to change any setting aplied with languages. Some programs I've write before didn't run properly on diffrent languages systems. (I'm talking about VB 5)

 

thanks any way... :)

  • *Gurus*
Posted
If you know how the file is encoded with the special characters, you can specify that encoding when you create the streamreader. Most of the constructor overloads support specifying the encoding. If you don't know what encoding it is, just try all of them.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...