mysql 加载数据时去掉 unicode 斜杠
mysql strips unicode slash while loading data
这是我的 csv 文件数据样本。以'}'分隔
Q402342}Aho\u2013Corasick string matching algorithm
Q8071262}Zhu\u2013Takaoka string matching algorithm
Q8819520}Category:String matching algorithms
在mysql导入后,显示
|Q402342 | Ahou2013Corasick string matching algorithm
| 8071262 | Zhuu2013Takaoka string matching algorithm
| 13 | Category:String matching algorithms
剥离'\'后
如何解决这个问题..??
以下是我使用的加载命令
加载数据文件 'ids_articles.csv' 进入 TABLE wikidata_terms 字符集 UTF8 字段由 '}' 终止,由 '\\' 行转义,由 '\n' 终止;
查看https://dev.mysql.com/doc/refman/4.1/en/string-literals.html
在 mysql 中,\ 字符被称为转义符如果您想在字符串中输入 \,则需要在字符串中输入 2 \,这样 mysql 就知道您没有尝试转义你的字符串,这样你会得到:
Q402342}Aho\u2013Corasick string matching algorithm
这是我的 csv 文件数据样本。以'}'分隔
Q402342}Aho\u2013Corasick string matching algorithm
Q8071262}Zhu\u2013Takaoka string matching algorithm
Q8819520}Category:String matching algorithms
在mysql导入后,显示
|Q402342 | Ahou2013Corasick string matching algorithm
| 8071262 | Zhuu2013Takaoka string matching algorithm
| 13 | Category:String matching algorithms
剥离'\'后
如何解决这个问题..??
以下是我使用的加载命令
加载数据文件 'ids_articles.csv' 进入 TABLE wikidata_terms 字符集 UTF8 字段由 '}' 终止,由 '\\' 行转义,由 '\n' 终止;
查看https://dev.mysql.com/doc/refman/4.1/en/string-literals.html
在 mysql 中,\ 字符被称为转义符如果您想在字符串中输入 \,则需要在字符串中输入 2 \,这样 mysql 就知道您没有尝试转义你的字符串,这样你会得到:
Q402342}Aho\u2013Corasick string matching algorithm