本文介绍了phpMyAdmin 中的编码问题.特别是包含俄文文本的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我未来的 CMS/框架制作小模块/插件.我希望它从一开始就支持多语言.

I'm making small module/plugin for my future CMS/Framework. I wanted it from begining to be with multi-language support.

  • 我将我的新数据库设置为utf8_unicode_ci(我读到它更准确,然后是utf8_general_ci)
  • 将我的文件设置为没有 BOM 的 UTF-8
  • 每个页面都有头部 Content-Type: text/html;charset=utf8
  • I set my new database to utf8_unicode_ci (I read that it is more accurate, then utf8_general_ci)
  • Set my files to UTF-8 without BOM
  • Every page has in head Content-Type: text/html; charset=utf8

当我注册新用户时,新记录会添加到用户表中.我试图用俄语昵称注册用户.当我插入它形成时,它很好.将记录添加到表中.登录并用俄语问候也很好.但是当我查看表格中的记录时,昵称是一些乱码.我在浏览器中尝试了所有编码.没有任何帮助.

When I register new user new record is added to user table. I tried to register user with russian nickname. When I inserted it to form it was fine. Added record to table. Signed in and showed greetings fine in russian too. But when I looked at the record in table the nickname was some gibberish characters. I tried all encodings in browser. Nothing helped.

UPD:我什至尝试使用 SQLyog 查看数据.显示与 phpMyAdmin 相同.

UPD: I even tried to view data with SQLyog. Shows same as phpMyAdmin.

我的意思的小截图 替代文字 http://s43.radikal.ru/i101/1006/a9/f458f64a9918.png

谁能向我解释一下,可能是什么问题?

Could anyone explain to me, what might be the problem?

推荐答案

这是我之前关于同一问题的回答,请尝试:如何在php中正确显示另一种语言的mysql表数据

Here's an earlier answer of mine about the same problem, try that: How to display a mysql table data in another language properly in php

这篇关于phpMyAdmin 中的编码问题.特别是包含俄文文本的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 09:36