PHPMyAdmin doesn#39;t import unicode(PHPMyAdmin 不导入 unicode)
问题描述
当我使用 PHPMyAdmin 的导入功能时,它不会导入非 ASCII 字符,例如 ä、ö、ü、õ 以及字符后的其余单词.
When I use the import feature of PHPMyAdmin, it doesn't import non-ASCII characters such as ä, ö, ü, õ and the rest of the word after the characters.
当我用记事本打开 CSV 文件时,它会正常显示非 ASCII 字符,但是当我尝试导入它时 - 它不起作用.
When I open the CSV file with Notepad it displays the non-ASCII characters normally, but when I'm trying to import it - it doesn't work.
手动输入那些丢失的字符是可行的,MySQL 会按原样保存它们.有什么想法吗?
Entering those missing characters manually works and MySQL saves them just as it should. Any thoughts?
推荐答案
mySQL 在遇到当前字符集下无效的字符时会这样做.
mySQL will do this when it encounters a character that is invalid under the current character set.
您没有提到您使用什么工具来导入数据,但是您应该能够在导入时指定一个字符集.如果该字符集匹配数据库的,一切都会好起来的.另外,请确保文件实际上是用该字符集编码的.
You're not mentioning what tool you are using to import the data, but you should be able to specify a character set when importing. If that character set matches the database's, everything will be fine. Also, make sure the file is actually encoded in that character set.
如果您的导入工具没有提供选择字符集的选项,您可以尝试phpMyAdmin 确实如此.
If your import tool doesn't offer the option of selecting the character set, you could try phpMyAdmin which does.
这篇关于PHPMyAdmin 不导入 unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHPMyAdmin 不导入 unicode
基础教程推荐
- 在 SQL 中连接多个表 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
