I have a Datasetconatins data in greek character set for e.g.
Which got converted to ??????? while saving from C# string object to unsigned char in C.
Same issue with Russian language.
Please suggest some thoughts on the same.
I just noticed: you say that you save the text in C unsigned char. What do you want then?!—SA
Unicode code points in the subset covering Greek and Russian require up to 16 bits per character. The Unicode subset of first 216 code points is called Base Multilingual Plane. Other code points require more then 16 bits, which is also supported by Unicode. All Unicode UTFs support full set of code points; usually it's UTF-8, UTF-16 and, rarely, UTF-32. (No, UTF-8 does not mean 8 bit per character; UTF-16 does not mean 16 bits per characters; character size is variable.) Internally, .NET represents strings as UTF-16LE.
C char is only 8 bits. No way. Do something more reasonable. Forget about your legacy 8-bit encodings, they are gone.
If you have a particular problem, feel free to ask a follow-up question.
27 Dec '12 - 21:02
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)