I doubt it, too... but I did try and it didn't work... in the last post
I forgot to attach the result with sample string, my fault...
In this post I attached the result file of the test, and I tried to
System.Console.WriteLine(Data == BackConvert) before, it give me a False.
You can try it yourself... use the first line in the attached file as
the sample string...
FrzzMan said:
.NET GetBytes() and GetString() didn't work right with UTF-8 charset.
My following code prove that...
string Data = "UTF-8 string"; // <-- Insert some *long* UTF-8 string
byte[] DataBytes = System.Text.Encoding.UTF8.GetBytes(Data);
string BackConvert = System.Text.Encoding.UTF8.GetString(DataBytes);
System.IO.StreamWriter File = System.IO.File.CreateText("test.txt");
File.Write(Data + "\n" + BackConvert);
File.Close();
Wait a lil, see the attached text file, open it with your browser and
set browser text encoder to UTF-8, you'll see the different...
Um, I doubt it, to be honest. You'll need to give us a sample string to
show us what you mean.
To check that the strings are the same, you could just use
Console.WriteLine (Data==BackConvert);
miniLZO -- mini subset of the LZO real-time data compression library Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o...
miniLZO -- mini subset of the LZO real-time data compression library Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không nà o... Äây là tiếng Việtꀜҥnén thá» coi cóê¦Ò¥Æ°á»£c không nà o... Äây là tiếng Việt, nén ꀰҥỠcoi có được không nà o... Äây là tiếng ê¶Ò¥á»‡t, nén thá» coi có được không nà o... Äây là tiếng Việt, nén thá» coi có được không ê‚Ò¥o...