简体   繁体   English

fopen()之类的函数的字符编码是否取决于调用它们的进程的语言环境?

[英]Does the character encoding of functions like fopen() depends on the locale of the process that invoked them?

When you use a function like fopen() , you have to pass it a string argument for the filename. 当使用fopen()类的函数时,必须将文件名的字符串参数传递给它。 Does the character encoding of this string depend on the locale of the process that invoked the function? 此字符串的字符编码是否取决于调用该函数的进程的语言环境?

If it does, then on which locale category does the character encoding depend? 如果是,那么字符编码取决于哪个语言环境类别?

You have this tagged linux so... 您已将此标记为linux所以...

It depends on how you mount the file system, just take a look at mount options for different file systems in man mount . 这取决于您如何挂载文件系统,只需看看man mount不同文件系统的挂载选项即可。 For example iso9660 , vfat and fat have iocharset and utf8 options. 例如iso9660vfatfat具有iocharsetutf8选项。

Beyond this it's simply a "NUL-terminated, '/'-delimited sequence of bytes" 除此之外,它还只是一个“以NUL终止,以'/'分隔的字节序列”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM