I try to use UCS-2LE encoding in my c++ program. But how to specify the locale string for UCS-2LE? I tried following locale string in my g+ + test program:
"zh_CN.UCS-2" "zh_CN.UCS-2LE" "zh_CN.UCS2" but none of them work, all of them through a runtime exception for invalid locale name. I tried 'locale -a' to list all locale in my system. The above string didn't exist in the list. However, I found "UCS-2, UCS-2LE.." in "iconv -l", which is the list of all charset I can use libiconv to convert from and to. So, now I have 3 questions: 1. How to use "UCS-2LE" encoding in G++ program with the 'std::locale' favor, such as we can use mbstowcs() to do the convertion by set 'std::locale::global(loc)'? 2. How to list all valid locale string in 'std::locale'? Are same to 'locale -l'? 3. What and Why the difference of support for encoding between g++'s "std::locale" and libiconv? Cheers _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus