使用 utf8 phpMyAdmin 的俄语编码

Russian encoding with utf8 phpMyAdmin

我有这个 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 编辑数据库,因为名称显示不正确。 我已经在数据库和 table 到 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.