法国口音的字符编码 [英] Character encoding for French Accents
问题描述
我正在为法国客户开发我的第一个网站,我遇到了大量的问题,口音被显示为?。经过几天之后,我以为我明白了,但问题依然存在。
I'm developing my first website for a French client and I'm having massive issues with accents being displayed as "?".After googling it for days, I thought I understood, but issues persists.
为了简化,我将仅解释电子邮件标题(该消息包含法国口音)
To simplify it, I'll explain just the email headers (the message contains french accents)
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
我尝试使用字符集UTF-8和iso-8859-1,但我仍然得到这种类型的电子邮件:
I've tried using charset UTF-8 and the iso-8859-1, but I still get this type of emails:
Merci pour votre intérêt pour les tee shirts.
可以帮助吗?我正在使用mySql,HTML,PHP的这些问题。
Can any one help? I'm having these issues with mySql, HTML, PHP everywhere basically.
谢谢。
推荐答案
如果intérêt
显示为intérêt
您可能(即由于双编码)具有UTF-8编码文本,如同ISO-8859-1所示。
If intérêt
shows up as intérêt
you likely (i.e. short of corruption due to double encoding) have UTF-8 encoded text being shown up as if it were ISO-8859-1.
确保头部正确形成,并将内容呈现为UTF-8编码。
Make sure the headers are correctly formed and present the content as being UTF-8 encoded.
这篇关于法国口音的字符编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!