Re: Tired of MYSQL and Character Set Problems!
Writting meta tags is a good idea. However, according to HTTP
standard, the "Content-Type: text/html; charset=xxx" has higher
priority over the meta tag. So the first thing you need is to check
whether your HTTP server sends correct Content-Type header:
It should be either with charset=utf-8:
Content-Type: text/html; charset=utf-8
or with empty charset - to make browser honor META tags:
Content-Type: text/html
Note, by default, apache sends this header:
Content-Type: text/html; charset=iso-8859-1
which is wrong in your case - meta tags cannot help.
That can be the reason.
The second thing to check - whether the value gets
garbled during INSERT or during SELECT later.
You can use this query:
SELECT HEX(column) FROM table_name;
If you can see lots of '3F' substrings (which is the code for question mark),
then the values most likely were garbled during INSERT. It this is the case,
then turn on MySQL query log and check the INSERT queries - are they really
encoded in utf8? If you don't know how to do it - feel free to send the
log to me: <bar at mysql dot com>
Otherwise, you need to check what happens during SELECTs.
Do you display the inserted data on a Web page?
Or do you use some other MySQL clients? For example "mysql" or Query Browser.
What is your OS?
Subject
Views
Written By
Posted
3041
November 19, 2006 09:31PM
2162
November 24, 2006 09:44PM
2093
November 27, 2006 09:14AM
2047
November 27, 2006 11:36AM
2209
November 29, 2006 12:25PM
Re: Tired of MYSQL and Character Set Problems!
2284
December 01, 2006 04:41AM
3629
December 20, 2006 05:17PM
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.