开发者

Replace text in MySql database

开发者 https://www.devze.com 2023-02-15 17:05 出处:网络
I have a MySql database on my server with a table named table_1. However I imported a csv file which occasionally included \"café\". However the \"é\" was not inserted into the database table, so I

I have a MySql database on my server with a table named table_1. However I imported a csv file which occasionally included "café". However the "é" was not inserted into the database table, so I have be开发者_运维百科en left with the text "caf". So what I would like to know is how can I replace the word "caf" in my database table with "cafe"?


Looks like an encoding issue to me - make sure you're using UTF-8 throughout your DB, and reimport your CSV.

If you've used the LOAD DATA command in MySQL, you can pass it a CHARACTER SET, which, when set to 'utf8' should allow you to import that file correctly.


This is a common problem of encoding. I sugest that you change your mysql database to utf-8 via GUI or with this information

0

精彩评论

暂无评论...
验证码 换一张
取 消