C++ unicode UTF-16 encoding
- by Dan
Hi all,
I have a wide char string is L"hao123--??????", and it must be encoded to
"hao123--\u6211\u7684\u4E0A\u7F51\u4E3B\u9875". I was told that the encoded string is a
special “%uNNNN” format for encoding Unicode UTF-16 code points. In this
website(http://rishida.net/tools/conversion/), it tell me it's JavaScript escapes. But I
don't know how to encode it with C++.
It that any library to do this work? or give me some tips.
Thanks my friends!