Why my page cannot display é, instead, showing �?

I have set page encoding to utf-8 in html :

meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"

and in HTTP header, I have:

Content-Type text/html; charset=UTF-8

Why cannot show é correctly?

Thanks

Update: The data contains 'é' is crawled from internet, the crawler is written in Microsoft .Net. I used Mysql .Net Connector to connect mysql.

The page to display the 'é' is written in PHP.


You need to add much more information, but a is usually a sign for a ISO-8859-1 character in data that is treated as UTF-8.

It comes either from

  • The source file claiming to be UTF-8, but actually being saved as ISO-8859-1/Windows-8252 - check your file encoding in your editor or IDE

  • A database connection that uses ISO-8859-1 even though the database tables are UTF-8


  • The most likely explanation is that the page is not encoded using UTF-8, so when the browser tries to decode the text, it is doing so using the wrong encoding.

    You need to make sure that the actual document encoding matches the claimed encoding


    make sure your file does not have a BOM (byte order mark) at its beginning. i had this problem recently, and even though the file was saved as utf8 (checked several times), the BOM confused firefox and it wrongly displayed umlauts (i had html <meta> tags set to the correct encoding and http headers)

    链接地址: http://www.djcxy.com/p/45796.html

    上一篇: 如何在HTTP内容中指定字符集

    下一篇: 为什么我的网页无法显示é,而是显示 ?