You need to fix the source code first.
A string in .NET is actually just an array of 16-bit Unicode code points, characters, so the string does not have any particular encoding.
This is when you take this string and convert it to a set of bytes that encode.
In any case, as you did, a string is encoded into an array of bytes with one character set, and then decodes it with another, will not work, as you can see.
Can you tell us more about where this original line came from, and why do you think it was encoded incorrectly?
Lasse Vågsæther Karlsen Dec 17 '09 at 14:44 2009-12-17 14:44
source share