Array of bytes to Korean chars array?
-
Hi, i have an array of bytes i need to convert to a Korean string but i don't know how. I tried
char[] chars_array = System.Text.Encoding.GetEncoding(949).GetString(bytes_array).ToCharArray(); korean_string = new String(char_array);
but it ends with square and ! ? characters. Any idea :confused: -
Hi, i have an array of bytes i need to convert to a Korean string but i don't know how. I tried
char[] chars_array = System.Text.Encoding.GetEncoding(949).GetString(bytes_array).ToCharArray(); korean_string = new String(char_array);
but it ends with square and ! ? characters. Any idea :confused: -
Where does the array of bytes come from? Have you tried different encodings, like UTF-8 or UTF-16?
Thanks it helped, i just found
char[] array_country = System.Text.Encoding.Unicode.GetString(byte_country).ToCharArray(); string_country = new String(array_country); MessageBox.Show(string_country);
works perfectly, the message box show the good string in Korean. I then add the string to a listview, so is there any option to set to show the Korean characters in the listview? *edit ok it's resolved the problem came from the font i used in the listview ;P -- modified at 18:45 Saturday 1st December, 2007 -
Thanks it helped, i just found
char[] array_country = System.Text.Encoding.Unicode.GetString(byte_country).ToCharArray(); string_country = new String(array_country); MessageBox.Show(string_country);
works perfectly, the message box show the good string in Korean. I then add the string to a listview, so is there any option to set to show the Korean characters in the listview? *edit ok it's resolved the problem came from the font i used in the listview ;P -- modified at 18:45 Saturday 1st December, 2007You may have to change the font that your listview uses to show Korean. There's a universal Arial font that has CJK characters. By the way, I took your Korean characters and pasted them into a text file in VS2005 and saved it with 'Unicode - Codepage 1200' encoding. After the identifying BOM in the file, I get: 74 C7 C8 D0 AC B9 44 C5.
Cyril Connolly wrote:
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.