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]Re: [tlug] MySQL and utf8 Japanese characters. Again.
- Date: Fri, 28 Apr 2006 17:08:59 +0900
- From: "Birkir A. Barkarson" <birkirb@example.com>
- Subject: Re: [tlug] MySQL and utf8 Japanese characters. Again.
- References: <4451BB05.6070609@example.com>
- User-agent: Thunderbird 1.5 (X11/20060313)
I had a similar problem a few months back. You might try this,In the mysqld section of my.cnf (or the main configuration file if it is named differently) add the 'skip-character-set-client-handshake' directive so.[mysqld] #character-set-client = utf8 #character-set-connection = utf8 #character-set-results = utf8 character-set-server = utf8 default-character-set = utf8 user = mysql port = 3306socket = /var/run/mysqld/mysqld.sockpid-file = /var/run/mysqld/mysqld.pid log-error = /var/log/mysql/mysqld.err basedir = /usr datadir = /var/lib/mysql skip-locking #skip-innodb skip-character-set-client-handshake Regards, BAB Dave M G wrote: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.
- Follow-Ups:
- References:
- [tlug] MySQL and utf8 Japanese characters. Again.
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] MySQL and utf8 Japanese characters. Again.
- Next by Date: Re: [tlug] 2.6 Kernel vs 2.4 Kernel: "internal s/w"
- Previous by thread: Re: [tlug] MySQL and utf8 Japanese characters. Again.
- Next by thread: Re: [tlug] MySQL and utf8 Japanese characters. Again. [SOLVED]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links