Non-English characters in forms

Bamboozled

New member
Joined
Aug 22, 2011
Messages
2
Programming Experience
3-5
I have a form to display in textboxes text which has been read in from a txt file. The data can contain accented characters from European languages (French, Spanish etc.) but when these occur the display is corrupted. How do I configure VB.NET to handle these characters (I am assuming there is some setting to do this rather than having to write code to process all input)? Thanks.
 
Use the correct encoding when reading from the file. Default for most .Net calls is Utf-8, but you can specify any encoding, including dynamically the systems default.
 
Thanks for the reply, JohnH. Problem is I can't find how or where to change system default. Everything I can find online uses conversion progs which quite frankly I have difficulty understanding.
 
You don't change system. You use either a specific encoding or the dynamic default encoding when you read the text file.
 
Back
Top