Re: set names 'utf8'
Posted by: Banzai 301
Date: February 14, 2009 09:18AM

Shuichi Tamagawa :

Thank you. This was HIGHLY helpful.

I was working on a web app with spanish characters with accents, and I had gone for ut8 everywhere (webpages, db charset and collation) however I had the following problems :

- when browsing the db with phpmadmin the accented characters would not display correctly (they were fine when retrieved and display on my web pages with php), which I found suspect. For instance I would see 'é' instead of 'é', or 'ñ' instead of 'ñ'.

- searches (select statements) with MATCH AGAINST or LIKE would not be accent insensitive, which was a problem (and it was supposed to be with the choosen collation).

In the end I ran the "show variables like 'character_set%';" and saw that "character_set_server" was latin1.

That's were I found your recommendation and added the "mysql_query("SET NAMES 'utf8'");" to my php db connection code.

What a relief. I had to reenter the data in the DB but everything is working as expected now...

Thanks again.

Options: ReplyQuote


Subject
Views
Written By
Posted
66918
September 29, 2005 02:30AM
21181
September 30, 2005 02:54AM
47812
September 30, 2005 11:45AM
15226
October 04, 2005 02:52PM
15176
November 20, 2007 06:04AM
Re: set names 'utf8'
12275
February 14, 2009 09:18AM


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.