UTF-8 Japanese goes into MySQL OK, comes out question marks

From: Date: Tue, 15 May 2007 04:30:15 +0000
Subject: UTF-8 Japanese goes into MySQL OK, comes out question marks
Groups: php.i18n 
Request: Send a blank email to php-i18n+get-1072@lists.php.net to get a copy of this message
OK, this is officially driving me nuts. In phpMyAdmin, I can see the Japanese text in the db. By sending the query SET NAMES 'utf8' before inserting data, I can get my own PHP scripts to input correctly. However, in my PHP scripts the Japanese text is coming out of the DB as question marks. Static Japanese text on the page is OK, so it's not a problem with the browser font. PHP 5.2.2, MySQL 4.13-beta-standard php.ini: mbstring.detect_order = auto mbstring.encoding_translation = On mbstring.func_overload = 0 mbstring.http_input = auto mbstring.http_output = UTF-8 mbstring.internal_encoding = UTF-8 mbstring.language = Neutral mbstring.script_encoding = none mbstring.strict_detection = Off mbstring.substitute_character = none /etc/my.cfg [client] default-character-set=utf8 [mysqld] init-connect=SET NAMES 'utf8' collation_server=utf8_unicode_ci character_set_server=utf8 default-character-set=utf8 Thanks, Rich

« previous php.i18n (#1072) next »