How to deal with Unicode strings in C/C++ in a cross-platform friendly way?

后端 未结 3 770
情话喂你
情话喂你 2021-01-05 09:31

On platforms different than Windows you could easily use char * strings and treat them as UTF-8.

The problem is that on Windows you are required to acce

3条回答
  •  感动是毒
    2021-01-05 09:58

    You can keep all your strings UTF-8 encoded and just convert them to UTF-16 before interacting with WIn32 API. Take a look at UTF8-CPP library for some easy to use conversion functions

提交回复
热议问题