我有一个 ISO-8859 文件需要转换为 UTF-8:
file *
test.csv: ISO-8859 text, with very long lines, with CRLF line terminators
现在我像这样使用 Windows 的 iconv.exe:
iconv.exe -f iso-8859-1 -t utf-8//TRANSLIT test.csv > conv.csv
问题是现在我看到了奇怪的字符,其中有拉丁字符(例如 à、ì、...),通过检查似乎它被转换为 UTF-16!
file *
test.csv: ISO-8859 text, with very long lines, with CRLF line terminators
conv.csv: Little-endian UTF-16 Unicode text, with very long lines, with CRLF, CR line terminators
这是为什么?我怎样才能实现简单的 UTF-8?