开发者

What's a small LGPL library for C++ UTF-8/UTF-16 text encoding?

开发者 https://www.devze.com 2023-03-19 05:35 出处:网络
Need something small and portable. Currently looking at UTF8-CPP but thought that I开发者_JAVA技巧\'d reach out for other suggestions too.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号