2011-12-29 38 views
0

我正在编写一个书签并向当前网站发送一些关于php脚本的信息。书签 - 字符集 - 特殊字符

我有一些网站标题的麻烦。 例如,如果该网站的标题是

urban archaeology: sleeping beauty’s paris apartment 

它看起来像这样在SQL数据库

urban archaeology: sleeping beauty’s paris apartment 

是因为该领域的整理?现在是latin1_swedish_ci。

回答

1

确保你的HTML头指定UTF8

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 

Normaly的伎俩(显然如果内容是UTF8)。

+0

此外,如果你的数据已经存储在你的数据库screwey中,那么你可能想看看http://stackoverflow.com/questions/4583369/an-apostrophe-is-rendering-as-atm- what-php-function-will-display-it-as-som – 2011-12-29 23:09:56

+0

在我的页面中添加了该行,但它仍然不起作用 – Backslash 2011-12-29 23:17:52

+0

就像我在我的评论中所说的,如果你的数据已经存储在你的数据库中,将不得不使用上面链接中的功能来清理它。或者通过你的数据库,并做一个手动清理 – 2011-12-29 23:19:11

0

将排序规则更改为UTF-8。

+0

完成。但它看起来仍然相同 – Backslash 2011-12-29 23:17:15