One of possible way to deal with is to change convert column which have to show by UTF8 in SQL query.
The solutions is as following:
CONVERT(CAST(column_name) as BINARY) USING UTF8)
"This is a similar approach to our SELECT CONVERT(CAST(city as BINARY) USING utf8) trick above, where we basically hide the column’s actual data from MySQL by masking it as BINARY temporarily.
If you simply force the column to UTF-8 without the BINARY conversion, MySQL does a data-changing conversion of your “latin1″ characters into “UTF-8″ and you end up with improperly converted data. Converting the column to BINARY first forces MySQL to not realize the data was in UTF-8 in the first place."I referenced this from this site: http://nicj.net/mysql-converting-an-incorrect-latin1-column-to-utf8/
댓글 없음:
댓글 쓰기