Are wide characters string literals encoded in UTF-16LE?

Say I have the following:

wchar_t *str = L"Hello World!";

Is L"Hello World!"encoded in UTF-16LE or UTF-16BE?

Note. I am using Visual C ++ 2010.

+4
source share
2 answers

Depends on your editor, VS2010 uses UTF-8 by default :) Using a specification that the compiler can tell. It can be changed, click the arrow on the "Save" button.

The compiler will turn it into UTF-16LE in the object file, and the rest of the big-endian machines are supported by msv ++, which I know about, ARM kernels are currently running in little-endian mode.

+3

, Windows UTF-16 - . : , Windows ?

+4

Source: https://habr.com/ru/post/1583954/


All Articles