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 16:07:46 +0900
- From: Keith Bawden <isdj@example.com>
- Subject: Re: [tlug] MySQL and utf8 Japanese characters. Again.
- References: <4451BB05.6070609@example.com>
- User-agent: Thunderbird 1.5.0.2 (X11/20060420)
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.Hello, Not sure if these issues will help, but you can try the following. What is your locale set to? Type locale to find out.Also, check if you have generated the required UTF-8 locales on your machine. This command will help: dpkg-reconfigure localesRegards, Keith
- References:
- [tlug] MySQL and utf8 Japanese characters. Again.
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] 2.6 Kernel vs 2.4 Kernel: "internal s/w"
- Next by Date: Re: [tlug] Linux Filesystems Comparison Article
- Previous by thread: [tlug] MySQL and utf8 Japanese characters. Again.
- Next by thread: Re: [tlug] MySQL and utf8 Japanese characters. Again.
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links