如何将多语言MySQL表导出到Excel而不出现乱码(例如à¹à¸­à¸™à& #xB8;™à)?

发布于 2024-09-10 01:42:14 字数 512 浏览 1 评论 0原文

我有一个 MySQL 表,其中存储以任何语言输入的文本。文本在网站上正确显示,示例,但是当我将数据导出到 Excel 时,出现乱码文本。

我尝试通过 PHPMyAdmin 导出数据,甚至只是从命令行执行一些操作,例如 mysql -user -p db <;查询.sql> export.tsv 和我得到乱码文本。例如,我得到的不是 animación,而是 animación,或者不是 แอนนิเมชั่น,而是得到 à¸à¸à¸™à¸™à¸´à¹€à¸¡à¸Šà¸±à¸¸±à¸¸à¸™。

这可能是涉及 Excel、MySQL 和 PHPMyAdmin 等因素的组合,但我想其他人也尝试过这样做。

I have a MySQL table where I store text entered in any kind of language. The text is displayed correctly on the website, example but when I export the data to Excel I get garbled text.

I tried exporting the data via PHPMyAdmin and even just doing something from the command line like mysql -user -p db < query.sql > export.tsv and I get garbled text. For example instead of animación I get animación or instead of แอนนิเมชั่น I get à¹à¸­à¸™à¸™à¸´à¹€à¸¡à¸Šà¸±à¹ˆà¸™.

This could be a combination of factors involving Excel, MySQL and PHPMyAdmin, but I imagine others have tried to do the same.

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

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

发布评论

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

评论(1

乱世争霸 2024-09-17 01:42:14

Excel 和 Mysql 完全支持 Unicode,但 PHP(我认为)没有很好的 Unicode 支持,因此您可能会因此而无法从 PHPMyAdmin 导出。

在网上寻找一个好的 mysql 管理器,它将以 Unicode 格式正确地从表中导出数据,应该没问题。

Excel and Mysql support Unicode fully, but PHP (I think) doesn't have very good Unicode support, so you may be having trouble exporting from PHPMyAdmin for that reason.

Look on the web for a good mysql manager which will export data from your tables correctly in Unicode format and you should be fine.

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