Jump to content

[SOLVED] UTF-8 Japanese text from mysql won't display


jamerson

Recommended Posts

Hi, this has me stumped. I have a mysql database setup with UTF-8 Unicode as the collation. In one of the tables I have some Japanese text. MyPHP displays it beautifully no problems at all.

I have a php script that simply does a SELECT * from the table and then sticks the output into the web browser. However for the life of me I cannot get that output to be Japanese, it's just ????.

 

I've inserted a meta tag with charset=utf-8, I've even set the header via php header('Content-Type:text/html; charset=UTF-8');, set the internal encoding to utf-8. So as you can see I'm clutching at straws here. Now the really annoying thing is that if I just paste the Japanese text into the body area of the html page, that displays just fine as well. So what on earth am I doing wrong here, should I be telling php to expect utf-8 out of the database or does it just get that automatically?

 

Please help, it's driving me nuts!

 

Jamerson ???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.