Re: Some utf8 characters show correctly on one server, but do not on the other
Posted by: Jos Smeets
Date: August 10, 2006 04:16AM

I'm replying to my own mail. I did some more research on this, e.g. I read http://dev.mysql.com/doc/refman/4.1/en/charset-conversion.html . This is what I think might have happened:

- I used to store utf8 texts in latin1 columns (MySQL 4.0). Characters were shown correctly, as far as I can remember.
- When my hosting provider upgraded MySQL to 4.1, no conversion of the data was done on their servers.
- I _think_ I did some sort of upgrade on my own server at home, but I don't recall concerting columns from latin1 to BINARY first, then upgrade to 4.1, and then covert BINARY to UTF8 (as described on the page referenced above).

I also read that to get proper utf8 behaviour you need to do a "SET NAMES utf8;" at the beginning of every session. The way I have things set up now, it only shows utf8 characters properly on my site without this command!

As far as I can judge now, I have the following situation:
I have a MySQL 4.1 database with in it utf8 columns, which contain utf characters, but they are not inserted the correct way.

My questions: Do you think my analysis is correct? Am I looking in the right direction? Can I do some sort of upgrade to repair (most of) this?

Jos

(Some day I'll be a character encoding expert...)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Some utf8 characters show correctly on one server, but do not on the other
1824
August 10, 2006 04:16AM


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.