开发者

My apostrophies look like small boxes

开发者 https://www.devze.com 2022-12-16 19:08 出处:网络
If开发者_开发知识库 you go to the page www.winteradagency.com/mrw/revitalization.php you see that within the text of the document, which is being generated from a database, the apostrophes look like s

If开发者_开发知识库 you go to the page www.winteradagency.com/mrw/revitalization.php you see that within the text of the document, which is being generated from a database, the apostrophes look like small boxes. How do I fix that?


The issue is character sets and encoding.

The following must have the same encoding:

  • The database tables (and columns)
  • Your database connection (SET NAMES....)
  • Your HTML page

Seeing that your web page is output in UTF-8, either your database tables, or your database connection probably has the wrong encoding (most likely ISO-8859-1).

This is good basic reading on the issue: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)


Your encoding is broken. If you switch to ISO-8859-1 in your browser everything looks fine. Either make sure that your text editor saves files as utf-8 or change encoding in the meta tag to iso-8859-1.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号