However there are characters in the file that are non-english, and whenAsk the author of the file how it is encoded. Then use that encoding to
I process the file these characters are getting replaced by blanks. For
example:
Barkóczi Miklós
becomes
Bark�czi, Mikl�s
Can anyone tell me how I can process the file and retain the characters?
I tried Unicode but that did not work...
read the file. For instance if it is UTF-8 encoded then use
new StreamReader("file.txt", Encoding.UTF8)
if it is Windows-1252 encoded then use
new StreamReader("file.txt", Encoding.GetEncoding(1252))
You could also try
new StreamReader("file.txt", Encoding.Default)
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/