I am reading in a text file and displaying the data read in in textboxes. Some of the characters are accented French characters which are not displaying correctly in the form. This prob does not exist with VB6 on the same machine. What do I need to set/change in vb.net to display these characters properly.

Recommended Answers

All 3 Replies

Probably you need to decode the text from the file using the System.Text.Encoding and System.Text.Decoder classes.

The way is to read the bytes of the source file using an stream reader, convert the bytes using the appropiate decoder and present the result on screen.

Hope this helps

Thanks. Yes, it looks as if that is the only way. It seems weird that defaults can be set for almost everything except character sets.

Please, if this solved this current thread, mark it as solved.

Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.