Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
630 views
in Technique[技术] by (71.8m points)

html - 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 isn't the é shown correctly?


Update:
The data containing the é is crawled from the 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...