Linux内核使用哪种Unicode编码?

时间:2012-04-07 03:45:12

标签: linux unicode character-encoding

我了解到Windows在x86 / x64系统上使用UTF-16LE。 Linux怎么样?它使用哪种Unicode编码:UTF-16LE或UTF-32?

2 个答案:

答案 0 :(得分:3)

一般来说,Unix更喜欢UTF-8。这个document表明Linux内核也是如此。

答案 1 :(得分:2)

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

  

的Linux

     

在Linux上,UTF8是所有字符串的“本机”编码,是fopen()等系统例程接受的格式。

所以Linux在这方面就像Plan 9boost::filesystem and Unicode under Linux and Windows注意

  

在我看来,boost::filesystem在Linux下path::native()中没有提供宽字符串,尽管已使用宽字符串初始化boost::filesystem::path

这将排除UTF-16和UTF-32,因为它们的所有变体都需要广泛的字符支持 - 字符串内允许NUL字节。