Which Unicode encoding does the Linux kernel use?

character-encoding, linux, unicode

Solution

http://www.xsquawkbox.net/xpsdk/mediawiki/Unicode says

Linux

On Linux, UTF8 is the 'native' encoding for all strings, and is the format accepted by system routines like `fopen()`.

so Linux is like Plan 9 in that respect, and boost::filesystem and Unicode under Linux and Windows notes

It looks to me like `boost::filesystem` under Linux does not provide a wide character string in `path::native()`, despite `boost::filesystem::path` having been initialized with a wide string.

which would rule out UTF-16 and UTF-32 since all variants of those require wide character support -- NUL bytes allowed inside strings.

Problem

I have learned that Windows uses UTF-16LE on x86/x64 systems. What about Linux? Which Unicode encoding does it use: UTF-16LE or UTF-32?

Original source

Related problems