mysql strips unicode slash while loading data -
this csv file data sample. separated '}'
q402342}aho\u2013corasick string matching algorithm
q8071262}zhu\u2013takaoka string matching algorithm
q8819520}category:string matching algorithms
after importing in mysql , shows
|q402342 | ahou2013corasick string matching algorithm
| 8071262 | zhuu2013takaoka string matching algorithm
| 13 | category:string matching algorithms
after stripping '\'
how fix ..??
following load command used
load data infile 'ids_articles.csv' table wikidata_terms character set utf8 fields terminated '}' escaped '\\' lines terminated '\n';
check out https://dev.mysql.com/doc/refman/4.1/en/string-literals.html
in mysql \ character known escape character if wish enter \ in string need put 2 \ in string mysql knows not trying escape string get:
q402342}aho\\u2013corasick string matching algorithm
Comments
Post a Comment