utf-8和ISO-8859-1字符集之​​间的奇怪字符问题。需要解释 [英] Strange character issue between utf-8 and ISO-8859-1 character sets. Need explanation

查看:238
本文介绍了utf-8和ISO-8859-1字符集之​​间的奇怪字符问题。需要解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

奇怪的字符显示为 ,而我的页面编码是在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆