GetString and ANSI

  • Thread starter Thread starter Alex Leduc
  • Start date Start date
A

Alex Leduc

I have some french accentuated characters that I'm trying to read from a
text file. The ASCIIEncoding Class's GetString doesn't support
characters with Char values above (char)127. I have a byte who's value
is (char)233 and I would like to know how to know how to get the
expected accentuated "e" character from this value.

Is there a more appropriate Encoding class?

MSDN reference ANSI Character set (128 - 255)
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/script56/html/vsmscANSITable2.htm

Alexandre Leduc
 
Alex said:
I have some french accentuated characters that I'm trying to read
from a text file. The ASCIIEncoding Class's GetString doesn't support
characters with Char values above (char)127. I have a byte who's value
is (char)233 and I would like to know how to know how to get the
expected accentuated "e" character from this value.

Is there a more appropriate Encoding class?

Encoding.Default (assuming it is Cp1252 on your Windows installation) should
do the trick here.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top