调用fopen或open时使用什么编码? [英] What encoding used when invoke fopen or open?

查看:215
本文介绍了调用fopen或open时使用什么编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在Linux中调用"open"之类的系统调用或在"fopen"之类的stdio函数中调用时,我们必须提供一个"const char * filename".我的问题是这里使用的编码是什么?是utf-8还是ascii或iso8859-x?是否取决于系统或环境设置?

When we invoke system call in linux like 'open' or stdio function like 'fopen' we must provide a 'const char * filename'. My question is what is the encoding used here? It's utf-8 or ascii or iso8859-x? Does it depend on the system or environment setting?

我知道在MS Windows中有一个_wopen接受utf-16.

I know in MS Windows there is a _wopen which accept utf-16.

推荐答案

这是一个字节字符串,解释取决于特定的文件系统.

It's a byte string, the interpretation is up to the particular filesystem.

这篇关于调用fopen或open时使用什么编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆