C++ UTF-8 output with ICU

后端 未结 3 1226
北恋
北恋 2021-01-11 11:57

I\'m struggling to get started with the C++ ICU library. I have tried to get the simplest example to work, but even that has failed. I would just like to output a UTF-8 stri

3条回答
  •  温柔的废话
    2021-01-11 12:19

    operator<<(ostream, UnicodeString) converts between UTF16 and chars by using ICU's "default converter". AFAIU, the "default converter" (if you don't set it explicitly with ucnv_setDefaultName()) depends on the platform and the way ICU was compiled. What do you get from ucnv_getDefaultName()?

提交回复
热议问题