![]() |
Japanese Characters with PHP
I've got a MySQL DB with Japanese characters in it, stored as UTF-8. How can I make PHP print them out as Japanese characters?
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
In the <head> section of your HTML output should get you there. There are also a bunch of functions in PHP that will output the correct stuff for date and number formatting, the key is to putenv('LC='.$their_locale); Unfortunately, $their_locale is different on different OS's/distributions, so you'll have to figure it out on your own, but that should be a good start for you. |
I got it to work... in Firefox.
In IE It displays them as ASCII characters. If I use VIEW SOURCE on the IE page, it shows them as Japanese characters.... www.tinkerslab.com/japanese.php |
Ahh. IE, the web developers nightmare.
Okay, try this instead, put it before you output ANY content. header('Content-Type:','text/html; charset=UTF-8'); That should tell IE earlier on that you are going to feed it UTF-8, and that it should be expecting that. |
Still a no go...
Put the header in the php |
All times are GMT -8. The time now is 04:44 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project