富文本撇号打印不正确
我正在回显文本,所有撇号看起来都像这样 â
,因此单词 it's
被打印为 Itâs
。我需要对文本做一些事情,比如对其进行编码或解码之类的吗?我该如何解决这个问题?
注意:实际上,似乎 stackoverflow 也不会打印我看到的字符。撇号更改为您在上面看到的 â
,旁边有 2 个框,其中包含数字 0080 和 0099。但是 stackoverflow 从这里删除了它们。
I'm echoing text and all the apostrophes look like this â
so the word it's
is printed as Itâs
. Is there something I need to do to the text, like encode it or decode it or something. How can I fix this?
note: actually, it seems even stackoverflow wouldn't print the characters I see. The apostrophes are changed to the â
you see above, and 2 boxes next to it which contain the numbers 0080 and 0099. But stackoverflow deletes them from here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 php 专家,但开发 IDE 可能不支持 UTF-8 或 ANSI 以外的编码。解决方法是复制原始文本并将其粘贴到具有 ANSI 编码的文本文件中。手动修复丢失的字符,然后将该文件中的文本复制到开发 IDE 中。如果您不想这样做,则必须输入这些问题字符的实际十进制或十六进制值。
I am not a php guy but it might be possible that development IDE would not support UTF-8 or encoding other than ANSI. Workaround is to copy the original text and paste it into the text file which has ANSI encoding. Fix your missing characters manually and then copy the text from that file into your development IDE. If you don't want to do this then you have to enter the actual decimal or hex values of those problem characters.