有一个标准的方法做一个fopen与unicode字符串文件路径? [英] Is there a standard way to do an fopen with a unicode string file path?

查看:816
本文介绍了有一个标准的方法做一个fopen与unicode字符串文件路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个标准的方法做一个fopen与unicode字符串文件路径?

Is there a standard way to do an fopen with a unicode string file path?

推荐答案

使用标准fopen(请参阅TokeMacGuy的回复中的更多信息,或者在此论坛
在Windows中,您可以使用_wfopen,然后传递unicode字符串(有关更多信息,请参阅 MSDN )。

In *nix, you simply use the standard fopen (see more information in reply from TokeMacGuy, or in this forum) In windows, you can use _wfopen, and then pass a unicode string (for more information, see MSDN).

由于没有真正的共同方式,调用宏,以及所有其他与系统相关的函数。

As there is no real common way, I would wrap this call in a macro, together with all other system-dependent functions.

这篇关于有一个标准的方法做一个fopen与unicode字符串文件路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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