Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] MySQL and utf8 Japanese characters. Again.
- Date: Fri, 28 Apr 2006 15:49:41 +0900
- From: Dave M G <martin@example.com>
- Subject: [tlug] MySQL and utf8 Japanese characters. Again.
- User-agent: Mail/News 1.5 (X11/20060309)
TLUG, Old problems are new again. Yay!Some might recall that I had some trouble getting Japanese contained within my MySQL database to display correctly in my home environment:http://www.tlug.jp/ML/0602/msg00259.htmlTo summarize, I have a database on a server that contains English and Japanese text. I have tried to ensure at every turn that all text encoding is in utf8.On the web hosting server where the live site resides, everything is working fine.But on my testing environment at home, the Japanese text displays as question marks.Japanese text that is written directly into the PHP/HTML displays correctly. Only Japanese text retrieved from the database displays incorrectly.All the Japanese text was initially entered on the hosting server. To get the database duplicated onto my testing environment, I exported the database, and then imported it again. I also checked the .sql file that was generated to ensure that the utf8 encoded Japanese was still readable as Japanese before importing it.Further, when I look at the database in phpMyAdmin, it displays the Japanese correctly, thus indicating that it is possible to see the text from within a PHP/HTML page.The solution, last time, was to add the following lines to /etc/mysql/my.cnf init-connect='SET NAMES utf8' character-set-server=utf8 collation-server=utf8_general_ci I've done this, and so these are my collation variables: Variable Session value Global value character set client utf8 utf8 character set connection utf8 utf8 character set database utf8 utf8 character set results utf8 utf8 character set server utf8 utf8 character set system utf8 utf8character sets dir /usr/share/mysql/charsets/ /usr/share/mysql/charsets/collation connection utf8_general_ci utf8_general_ci collation database utf8_general_ci utf8_general_ci collation server utf8_general_ci utf8_general_ci But this time the same solution does not seem to be working now.I've posted on the MySQL mailing list, but people the question doesn't seem to be attracting any interest. So here I am again:Is there any other character set related setting that I may need to do on my local MySQL server to correctly display Japanese?My home set up: Ubuntu Dapper Drake 6.06 MySQL MySQL 4.1.15 phpMyAdmin 2.7 PHP 4.4.2 Any help would be much appreciated. Thank you. -- Dave M G
- Follow-Ups:
- Re: [tlug] MySQL and utf8 Japanese characters. Again.
- From: Keith Bawden
- Re: [tlug] MySQL and utf8 Japanese characters. Again.
- From: David E
- Re: [tlug] MySQL and utf8 Japanese characters. Again.
- From: Birkir A. Barkarson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Linux Filesystems Comparison Article
- Next by Date: Re: [tlug] 2.6 Kernel vs 2.4 Kernel: "internal s/w"
- Previous by thread: Re: [tlug] 2.6 Kernel vs 2.4 Kernel
- Next by thread: Re: [tlug] MySQL and utf8 Japanese characters. Again.
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links