哪些编码在Mac和Windows上使用Excel正确打开CSV文件? [英] Which encoding opens CSV files correctly with Excel on both Mac and Windows?
问题描述
我们有一个网络应用程序,用于导出包含UTF-8外部字符的CSV文件,没有BOM。 Windows和Mac用户都在Excel中获取垃圾字符。我试图转换为UTF-8与BOM; Excel / Win是好的,Excel / Mac显示乱码。我使用Excel 2003 / Win,Excel 2011 / Mac。
这里是我尝试的所有编码:
We have a web app that exports CSV files containing foreign characters with UTF-8, no BOM. Both Windows and Mac users get garbage characters in Excel. I tried converting to UTF-8 with BOM; Excel/Win is fine with it, Excel/Mac shows gibberish. I'm using Excel 2003/Win, Excel 2011/Mac. Here's all the encodings I tried:
Encoding BOM Win Mac
-------- --- ---------------------------- ------------
utf-8 -- scrambled scrambled
utf-8 BOM WORKS scrambled
utf-16 -- file not recognized file not recognized
utf-16 BOM file not recognized Chinese gibberish
utf-16LE -- file not recognized file not recognized
utf-16LE BOM characters OK, same as Win
row data all in first field
最好的一个是带有BOM的UTF-16LE,但CSV不会被识别。字段分隔符是逗号,但分号不会改变任何内容。
The best one is UTF-16LE with BOM, but the CSV is not recognized as such. The field separator is comma, but semicolon doesn't change things.
有两种世界都有编码可用?
推荐答案
低位是:没有解决方案。 Excel 2011 / Mac无法正确解释包含umlauts和变音符号的CSV文件,无论你做什么编码或箍跳。我很高兴听到有人告诉我不同!
The lowdown is: There is no solution. Excel 2011/Mac cannot correctly interpret a CSV file containing umlauts and diacritical marks no matter what encoding or hoop jumping you do. I'd be glad to hear someone tell me different!
这篇关于哪些编码在Mac和Windows上使用Excel正确打开CSV文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!