What's a small LGPL library for C++ UTF-8/UTF-16 text encoding?
Need something small and portable. Currently looking at UTF8-CPP but thought that I开发者_JAVA技巧'd reach out for other suggestions too.
Cheers.
UTF-8CPP it is, just want to mark this question as done with. Thanks for all the help guys :)
ICU is an "International Components for Unicode" - portable and open source.
Haven't used it myself, so I can't say how good it is, but I know others that do.
Boost? or short source?
Ironically enough, the best/easiest/most robust way is to wrap Unicode-aware stdlib (C) functions like setlocale(), wprintf() and mbstowcs in your own, application-level) C++ classes. The APIs are portable, and they've been in use for many years.
A few links:
http://www.linux.com/archive/feed/51836
http://linuxgazette.net/147/pfeiffer.html
精彩评论