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?
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::filesystemunder Linux does not provide a wide character string inpath::native(), despiteboost::filesystem::pathhaving 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.
Generally Unix prefers UTF-8. This document suggests that Linux kernel does too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With