如何控制表单中的字符编码,以便正确存储法语口音
我有一个用于输入姓名的网络表单。有时,名称包含法语字符。我遇到了问题,特别是 é
。
查看和检索数据时,它会按预期显示,但是,当使用 UTF-8 编码导出并在 Open Office 中打开 CSV 时,法语字符将转换为 É
或有时甚至 < code>È 这是完全错误的。
但它并不一致,似乎字符会根据输入字符的方法而改变(使用 ALT+###
输入,而不是从某些内容复制/粘贴)。
如何使用户输入一致以便输出始终有效?
最终用途是 Photoshop 用于填充字段变量的 CSV 文件。
I have a web form that for entering names. Sometimes, the names contain french characters. I am having a problem with, in particular, the é
.
When the data is viewed and retrieved, it appears as it should, however, when the CSV is exported and opened in Open Office using UTF-8 encoding, the french character will translate to É
or sometimes even È
which is completely wrong.
But it's not consistent, it seems that the character will change depending on the method used to input the character (using the ALT+###
to enter, versus copy/paste from something).
How do I make the user input consistent so that the output always works?
The end use is a CSV file that Photoshop uses to populate field variables.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您使用的是哪个平台,但您的 CSV 导出可能是有效的 utf-8,被读取为 latin-1,或者反之亦然。
Not sure which platform you are on, but it may be that your CSV export is valid utf-8 that is being read as latin-1, or the other way around.