可不可以不把文件开头的BOM写出来?因为我想稍后在 DOS 中运行该文件,但它不喜欢那样。
例如script.bat
>
'' is not recognized as an internal or external command,
operable program or batch file.
>chcp 65001
Active code page: 65001
>mkdir c:\move
打开代码:-
FILE *out;
if((out = _wfopen(L"script.bat", L"wt+,ccs=UTF-8"))==NULL)
最佳答案
倒带(出);一开始就成功了。
关于c - 在 C 代码中使用 _wfopen 而不编写 BOM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31403047/