在C代码中使用_wfopen而不编写BOM

时间:2015-07-13 16:17:34

标签: c utf-8 byte-order-mark

是否可以不在文件开头写出BOM?因为我想稍后在dos中运行该文件,它不是那样的。

e.g.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)

1 个答案:

答案 0 :(得分:1)

倒带(下);一开始就做了伎俩。

相关问题