插入中文元标签

发布于 2024-08-13 06:13:21 字数 195 浏览 10 评论 0原文

我有一个多语言网站,但在插入中文元标记时遇到问题。这些都变成了问号。

有什么方法可以实现这一目标吗?

非常感谢

--编辑--

存储 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

稍尽春風 2024-08-20 06:13:21

请确保:

  • 您使用的字符编码包含这些字符(UTF-8 是安全的)
  • 您的编辑器已配置为使用该字符编码
  • 您的数据库(如果这些详细信息存储在其中)已配置为使用该编码
  • 您的网络服务器已配置为在 Content-type 标头上输出字符集参数(并且它使用正确的编码)
  • 您的浏览器未配置为忽略指定的编码

Make sure that:

  • The character encoding you are using includes those characters (UTF-8 is safe)
  • Your editor is configured to use that character encoding
  • Your database (if these details are stored in one) is configured to use that encoding
  • Your webserver is configured to output a charset parameter on the Content-type header (and it uses the correct encoding)
  • Your browser is not configured to ignore the specified encoding
挽手叙旧 2024-08-20 06:13:21

您正在从数据库中检索数据吗?
如果是这样,请确保您的连接字符集也设置为 utf-8。
例如,在 MySQL 中,您需要在任何其他查询之前发出此查询:

SET NAMES 'utf8';

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:

SET NAMES 'utf8';
稚气少女 2024-08-20 06:13:21

您可能需要将中文字符编码为 HTML 实体,或者指定字符集。

It could be that you need to encode the Chinese characters to HTML entities, or specify a character set.

白衬杉格子梦 2024-08-20 06:13:21

您检查过文档标题中的字符集吗?我通常使用UTF-8来实现中文字符集。

<meta http-equiv="Content-Type" content="text/html; charset=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.

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

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

花伊自在美 2024-08-20 06:13:21

也许您的浏览器 - 或者更准确地说,您选择用于显示页面的字体 - 不支持中文字符。这是在什么系统和浏览器上?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文