插入中文元标签
我有一个多语言网站,但在插入中文元标记时遇到问题。这些都变成了问号。
有什么方法可以实现这一目标吗?
非常感谢
--编辑--
存储 SEF URL 的表位于 latin1_swedish_ci 字符集中。如何在不破坏 URL 的情况下将此单个表更改为 utf8_general_ci?
非常感谢!
I have a multilingual site and I am having a problem inserting Chinese meta tags. These are transformed into question marks.
Is there a way how I can achieve this?
Many thanks
--EDIT--
The table storing the SEF Urls is in the latin1_swedish_ci character set. How can I change this single table to utf8_general_ci without breaking the URLs?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
请确保:
Make sure that:
使用数字字符引用。
编辑
wiki 数字字符引用
将汉字转换为Unicode
Use numeric character references.
EDIT
wiki numeric character references
Convert Chinese characters to Unicode
您正在从数据库中检索数据吗?
如果是这样,请确保您的连接字符集也设置为 utf-8。
例如,在 MySQL 中,您需要在任何其他查询之前发出此查询:
Are you retrieving the data from a database?
If so ensure that you connection character set is also set to utf-8.
In MySQL for example you would need to issue this query before any other:
您可能需要将中文字符编码为 HTML 实体,或者指定字符集。
It could be that you need to encode the Chinese characters to HTML entities, or specify a character set.
您检查过文档标题中的字符集吗?我通常使用UTF-8来实现中文字符集。
如果您使用的是 Dreamweaver 等程序,请确保您的文件实际上也以正确的字符集保存。我们遇到了一个问题,即 Dreamweaver 文件中的字符显示为 ????因为编辑器本身设置为iso-8859-1
Have you checked your character set in your document headers? I usually use UTF-8 to achieve chinese character sets.
If you're using a program like dreamweaver, make sure your files are actually being SAVED in the correct character set as well. We had a problem where characters in a dreamweaver file were coming through as ???? because the editor itself was set to iso-8859-1
也许您的浏览器 - 或者更准确地说,您选择用于显示页面的字体 - 不支持中文字符。这是在什么系统和浏览器上?
Maybe your Browser - or more exactly, the font you selected to display the page - doesn't support chinese characters. What system and browser is this on?