utf-8和ISO-8859-1字符集之间的奇怪字符问题。需要解释 [英] Strange character issue between utf-8 and ISO-8859-1 character sets. Need explanation
问题描述
奇怪的字符显示为 ,而我的页面编码是在utf-8,但如果编码是ISO-8859-1比它工作正常。我存储数据在mysql数据库与列编码utf-8和连接编码utf-8。所有其他字符如ß
正确显示,并且在数据库中存储相同。
有人可以解释哪个字符
U + FFFD是用于替换未知或不可打印字符的替换字符。基本上,这意味着你试图显示一个不可打印的字符。
也许这会为您提供一些指导:如何处理无效UTF-8字符的用户输入?
Strange character is shown as � in while my page encoding is in utf-8 but if encoding is ISO-8859-1 than it works fine. I am storing data in mysql database with column encoding utf-8 and connection encoding utf-8. all other characters such as ß
are shown properly and stored same in database.
Can some one explain which character is this and how to remove it?
Thanks.
The U+FFFD is a replacement character used to replace an unknown or unprintable character. Basically, this means you are trying to show an unprintable character.
Maybe this will offer some guidance on how to proceed: How to handle user input of invalid UTF-8 characters?
这篇关于utf-8和ISO-8859-1字符集之间的奇怪字符问题。需要解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!