gpt4 book ai didi

php - 使用 utf8 phpMyAdmin 的俄语编码

转载 作者:行者123 更新时间:2023-11-29 03:32:18 25 4
gpt4 key购买 nike

我有这个 xml 文件要解析:

 <?xml version="1.0" encoding="utf-8"?>
<Exchange_Rates>
<Actual_Rates>
<Bank>
<Name>АКРОПОЛЬ</Name>
<Url>http://bank...</Url>
</Bank>
</Actual_Rates>
</Exchange_Rates>

我将它解析到一个数据库中,一切正常,我可以用俄语 (АКРОПОЛЬ) 正确地读写带有 mysql 数据库的银行名称。但问题出在 phpMyAdmin 中,我无法使用 phpMyAdmin 编辑数据库,因为名称显示不正确。我已经将数据库和表中的整理设置为 utf8_general_ci。有帮助吗?

最佳答案

German Umlaute in Mysql/Phpmyadmin这对我有用

I struggled with the same problem for a long time. Run this query as soon as you connect to the database and your web application will display characters as they appear in phpmyadmin:

SET NAMES 'utf8'

For some reason MySQL is set up on my systems to assume input and output are encoded as latin1, which means when I send it utf8 input it stores it in the database incorrectly, but because the conversion is reversed for output, the mess is undone and it displays correctly in the browser (except when using phpmyadmin, which displays it faithfully). This is only true when the conversion results in characters that are permitted by the character set used in the database field where it is stored, so you can get errors unless you stop this conversion from happening with the above query.

关于php - 使用 utf8 phpMyAdmin 的俄语编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28837962/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com