通过 PHP 将日语 XML feed 插入到 MYSQL 表中

发布于 2024-09-07 06:47:11 字数 115 浏览 2 评论 0原文

我一直在寻找这个问题的解决方案,并尝试了找到的大多数答案。但不幸的是,我无法将日语 xml feed 插入到已创建的表中。

我尝试按照大多数答案的建议设置应使用 UTF8 的所有设置 - 但没有运气!

I've been looking for a solution to this issue and have tried most answers found. But with no luck was I able to insert the Japanese xml feed into the tables which have been created.

I tried setting all setting where UTF8 should be used as most answers have suggested - But no luck!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

回梦 2024-09-14 06:47:11
  • 通过将发出 SET NAMES utf8 作为第一个任务来检查连接字符集是否为 UTF-8。
  • 检查您用来查看数据的页面是否标记为 UTF-8:可以通过发送指定 UTF-8 的内容类型标头,或添加这样说明的元标记来执行此操作(抱歉,我对 XML 不太了解,所以我不知道它是如何完成的)。
  • 检查您接收的数据是否编码为 UTF-8。如果它是用其他字符集编码的,但你将它作为 UTF-8 呈现给 MySQL,那么它可能会被错误编码地存储在数据库中,或者 MySQL 可能会对其进行最佳理解,并对其进行乱码/截断因此。
  • Check that the connection character set is UTF-8 by making it issue SET NAMES utf8 as the first task it does.
  • Check that the page you are using to view the data is marked as UTF-8: do this either by sending a content-type header that specifies UTF-8, or by adding a meta tag that says so (I'm sorry, I don't know much about XML so I don't know how it is done).
  • Check that the data you are receiving is encoded as UTF-8. If it is encoded in some other character set but you are presenting it to MySQL as UTF-8, then it may get stored mis-encoded in the database, or MySQL may make the best sense of it that it can and garble/truncate it as a result.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文