Character encoding issues in MySQL
Posted
by Eric
on Stack Overflow
See other posts from Stack Overflow
or by Eric
Published on 2010-03-14T17:48:15Z
Indexed on
2010/03/14
17:55 UTC
Read the original article
Hit count: 201
In my database we have fields where the data is not readable. I now know why it happened but I don't know how to fix it.
I found a way to get the info back from the database:
SELECT id,
name
FROM projects
WHERE LENGTH(name) != CHAR_LENGTH(name);
One of the rows returned shows:
id | name
-------------------------
1008 | Cajón el Diablo
This should be:
id | name
-------------------------
1008 | Cajón el Diablo
Can somebody help me figure out how to fix this problem? How can I convert this using SQL? Is SQL not good? If not, how about Python?
© Stack Overflow or respective owner