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
10490
September 25, 2009 01:38PM
3648
September 26, 2009 05:48PM
3296
September 27, 2009 12:37PM
4528
September 27, 2009 05:44PM
3553
September 28, 2009 03:41PM
Re: UTF8 Chinese String Comparison
3785
September 28, 2009 03:49PM
3276
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.