-
UCS-2 and UTF-8 conversion
Hello everyone,
I am writing a pure C/C++ program to convert from UCS-2 to UTF-8 character string. I can not find enough information from Google -- the mapping tables (formula) between UCS-2 and UTF-8.
I want to develop the program through pure bit operations (&, | and shifting), and I do not want to invoking any OS specific APIs.
Any reference samples or the mapping tables (formula) between UCS-2 and UTF-8?
thanks in advance,
George
-
Registered User
Maybe you could look in the source code of ICU (IBM's open source library for Unicode).
-
Registered User
http://en.wikipedia.org/wiki/UCS-2
http://en.wikipedia.org/wiki/Utf-8
Wikipedia has good enough info. I've written Unicode converters with it's help.
-
Registered User
BTW why write a converter isn't the free libraries cover that functionality.
Popular pages
Recent additions