Re: UTF8 Chinese String Comparison
Posted by: CL Chuah
Date: September 28, 2009 03:49PM

Oh yah, for the corrupted data, i simply do this in PHP

1) Create DB connection-1 to table [test_utf]
SET NAMES latin1; -- or leave it to default
SELECT * FROM test_utf;

2) Create DB connection-2 to table [test_utf_clean]
SET NAMES utf8;

3) Loop every records from [test_utf]
- dynamic generate "INSERT INTO test_utf_clean VALUES (....)"
- execute the statement on connection-2

A quick fix, anyone with pure MySQL statements to do this (without PHP)?

Options: ReplyQuote


Subject
Views
Written By
Posted
9875
September 25, 2009 01:38PM
3441
September 26, 2009 05:48PM
3121
September 27, 2009 12:37PM
4285
September 27, 2009 05:44PM
3320
September 28, 2009 03:41PM
Re: UTF8 Chinese String Comparison
3541
September 28, 2009 03:49PM
3045
September 28, 2009 11:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.