C++ unicode file io

前端 未结 5 1474
广开言路
广开言路 2021-02-06 16:10

I need a file io library that can give my program a utf-16 (little endian) interface, but can handle files in other encodings, mainly ascii(input only), utf-8, utf-16, utf-32/uc

5条回答
  •  难免孤独
    2021-02-06 17:10

    UTF8-CPP gives you conversion between UTF-8, 16 and 32. Very nice and light library.

    About ICU, some comments by the UTF8-CPP creator :

    ICU Library. It is very powerful, complete, feature-rich, mature, and widely used. Also big, intrusive, non-generic, and doesn't play well with the Standard Library. I definitelly recommend looking at ICU even if you don't plan to use it.

    :)

提交回复
热议问题