I have been trying to figure out how to get my PHP script to display Japanese characters correctly. Whenever the array containing the characters is out put, they show up as ??
Ex:
Array ( [number] => 5414 [katahira] => ?? [romaji] => neko [kanji] => ? [definition] => cat [kanji pronunciation] => ?…?? ) ??
The characters show up correctly on my Mysql web interface fine. They are entered as:
Type: tinytext
Collation: utf8_unicode_ci
I have looked over a lot of pages, but the fixes are not working for me. Anyways, here is my code:
<?php
header('Content-Type: text/html;charset= utf8_unicode_ci');
$databaseName = bc1253;// database that is used
// connects to the database
$connection = mysql_connect("*******", "*********", "**********");
mysql_select_db($databaseName, $connection);
// searches the data base and returns the row the object is found in.
$result = mysql_query("SELECT * FROM Japanese WHERE Romaji = '$_POST[Word]'")
or die("broken");
// Puts row of results in an array
$outPut = mysql_fetch_array($result, MYSQL_ASSOC);
Print_r($outPut);
?>
[attachment deleted by admin]