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] Character encoding on web host's MySQL server
- Date: Tue, 11 Dec 2007 18:05:07 +0900
- From: Shawn <javajunkie@example.com>
- Subject: Re: [tlug] Character encoding on web host's MySQL server
- References: <475E3498.6050209@articlass.org>
Hi Dave, Have you seen: http://dev.mysql.com/doc/refman/4.1/en/charset-unicode.html http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html Many of the user comments at the bottom are along the lines of what Keith wrote. (I mention 5.0 because the comments there are a little more illustrative than those for 4.1, but basically look to be doing the same thing). I don't use PHP for my site, but noticed there were many PHP specific comments there recently. (I kinda assume you already have seen those pages but just mentioned it in case you hadn't). Best Regards, Shawn > TLUG, > > One of the web hosting services I use has PHP 5.2.5 and MySQL 4.1.16. > > I should mention before continuing that the site is for a group I help > out with, and the issue of changing hosting services is beyond my > control. So I've got to work with what I've got for now. > > Naturally, I want to make a site that displays Japanese text, and my > preferred encoding is utf-8. And the web hosting service seems to have > utf-8 supported... mostly. > > I just uploaded a new version of the web site, with all new and much > improved PHP code, and despite all indications that I have set > everything to use utf-8, the Japanese characters are coming up as all > question marks. > > It is not surprising that I am seeing this problem now, because my > previous web site version made do with storing Japanese as binary data, > because it was originally built for a MySQL 3.2 system where utf-8 > support was not very good. Now I want to get everything using more > current, sensible, and uniform use of utf-8. > > Looking in the phpMyAdmin interface for my webhost, I can see that some, > but not all, of MySQL's system variables are set to use utf-8 for > encoding and collation: > > character set client utf8 > (Global value) latin1 > character set connection utf8 > (Global value) latin1 > character set database latin1 > character set results utf8 > (Global value) latin1 > character set server latin1 > character set system utf8 > character sets dir /usr/share/mysql/charsets/ > collation connection utf8_unicode_ci > (Global value) latin1_swedish_ci > collation database latin1_swedish_ci > collation server latin1_swedish_ci > > On my home machine, where Japanese stored in MySQL works fine, I seem to > have ensured that everything is set to use utf-8 by adding the following > lines into my.cnf, under [mysqld]: > > # utf8 > init-connect='SET NAMES utf8' > character-set-server=utf8 > collation-server=utf8_general_ci > skip-character-set-client-handshake > > But, on this particular web host, I don't have access to modify my.cnf. > > So... my questions: > > On my home machine, *all* of the above listed variables are set to use > utf-8. But, in order to get proper utf-8 functionality, do I need to > worry about all of them, or are some more critical than others? > > I have emailed the web host support with most of the information here, > requesting that utf-8 support be made more complete. However, in > anticipation of the possibility that they can't comply because changing > settings would adversely affect other clients, can I somehow modify my > local environment enough to ensure proper functionality? If so, how? > > Thank you for any advice. > > -- > Dave M G > http://www.tlug.jp/wiki/User:Dave_M_G >
- Follow-Ups:
- References:
- [tlug] Character encoding on web host's MySQL server
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Character encoding on web host's MySQL server
- Next by Date: Re: [tlug] Character encoding on web host's MySQL server [SOLVED]
- Previous by thread: Re: [tlug] Character encoding on web host's MySQL server
- Next by thread: Re: [tlug] Character encoding on web host's MySQL server [SOLVED]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links