For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > July 2006 > Inserting Japanese characters into UTF-8 MySQL database via php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Inserting Japanese characters into UTF-8 MySQL database via php
marcin@netsign.pl

2006-07-31, 7:09 pm

I have problems with inserting Japanese chars into MySQL database. This
operation results in two completetely different strings that I can see
via phpMyAdmin:
$word: SELECT word FROM table;
INSERT $word INTO table;

Both commands are executed direclty via PHP, phpMyAdmin shows the
original word (inserted into table via phpMyAdmin) correctly and a
wrong copy (f.e. %&c/#....) of word inserted via PHP.

I preasume that the problem is PHP default coding, I tried to convert
encoding to UTF-8 by mb_convert_encoding($key, "UTF-8", "auto"); with
no success.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com