Re: storing japanese in mysql (or pgsql)
| From: | - Edwin - | Date: | Wed, 01 Oct 2003 01:59:57 +0000 |
| Subject: | Re: storing japanese in mysql (or pgsql) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164470@lists.php.net to get a copy of this message | ||
Hi,
"Chris W. Parker" <cparker@swatgear.com> wrote:
> (I posted this to another list yesterday without response, so if it
> looks familiar, that's why.)
>
> Hi.
>
> I'm working on a small study aid for myself (and anyone else that wants
> to use it) and I could really use the ability to store Japanese
> characters in a MySQL or pgsql db. Right now I've created a very large
> array.
>
> What I'd like to do is have a form that will allow me to add new
> characters whenever needed. So far my attempts at this have failed. It
> always seems that the extended characters get turned into their html
> entity equivalents before they are inserted into the db.
What exactly do you mean by "extended characters"? And, do you mean all *other* characters
are inserted properly? Anyway,...
> I'm using euc-jp as the character set.
>
> I'm pretty much lost with this. Anyone have experience with this that
> they'd like to share? (on or off list is fine.)
>
Well, setting the "default-character-set" to "ujis" for both the server and the
client works for me.
First check your "characterset"(s):
mysql> status
If they're not "ujis" (for euc-jp), add this to your "my.cnf" file: (Under
[mysqld] and [client])
default-character-set = ujis
Restart your servers.
Btw, check your php.ini as well and make sure that your settings under [mbstring] are correct.
HTH,
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/