|
-
July 19th, 2005, 04:34 PM
#1
Encoding problem
The following simple code does not work(sY is empty). Does anyone have an idea why. This is using .NET 1.1
Encoding u8 = Encoding.UTF8;
string sX = "\x92"; // WORKS!
byte[] byteOne = new byte[1];
byteOne[0] = (byte)146;
string sY = u8.GetString(byteOne); // NOIE WORKIE!
sX works fine because it has the hex value in the string, but sY converting from the byte array doesn't (it's empty).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|