Extended ASCII in C#
Posted on 2011-10-19
I have a string with extended characters in it.
string str = "›¥›";
When I convert into Byte, it's byte value is different:
System.Text.Encoding ascii = System.Text.Encoding.ASCII;
Byte encodedBytes = ascii.GetBytes(str );
All the extended characters are converted into ?(Question Mark), instead of their original extended characters.
encodeBytes char is ' ?' and value is 63. // Instead '>' and value 155
encodeBytes char is '?' and value is 63. // Instead '¥' and value 165
encodeBytes char is '?' and value is 63. // Instead '>' and value 155