我想用iconv来转换Mac上的文件.目标是从"Windows ANSI"转到"Windows Notepad保存的任何内容,如果你告诉它使用UFT8".
这就是我要的:
anders-johansen-privats-macbook-pro:test andersprivat$ file names.csv
names.csv: UTF-8 Unicode (with BOM) text, with CRLF line terminators
Run Code Online (Sandbox Code Playgroud)
这是我使用的:
iconv -f CP1252 -t UTF-8 names.csv > names.utf8.csv
Run Code Online (Sandbox Code Playgroud)
这就是我得到的(不是我想要的):
file names.utf8.csv
names.utf8.csv: UTF-8 Unicode text, with CRLF line terminators
Run Code Online (Sandbox Code Playgroud)
我如何获得BOM?