我有一个系统导出.csv文件,一些行包含特殊的框字符,使得数据如下所示:
Please specify the primary type of opportunity which you’re proposing: ?? Please specify what type of sport: ?? What is this person’s vocation? ??? How long have they been in the industry?
但是,当我在Excel中打开文件时,Excel会对框中的字符进行扭曲,使其最终看起来像这样:
Please specify the primary type of opportunity which you’re proposing: └─ Please specify what type of sport: └─ What is this person’s vocation? └── How long have they been in the industry?
该文件以纯文本形式保存到用户的硬盘中,我可以在文本编辑器中打开它并查看字符,所以我知道当Excel读入数据时会发生这种情况.
有什么想法吗?我怎么能阻止这个?
在PHP生成的CSV中,我使用utf8_decode()解决了相关列.