[COLOR=Red]SOLVED[/COLOR] =)
I’ve never worked with a foreign language before, so I’m a little stuck.
I built a simple backend that uploads data to a mySQL db using php.
The Thai language shows fine in the html textarea no problem.
However, I’m using php to create an XML file to yank the data.
<?php
$db = mysql_connect("localhost","XXXX","XXXX") or die("couldn't connect: " . mysql_error());
mysql_select_db("XXXX",$db) or die("no db: " . mysql_error());
header("Content-type: text/xml");
$xml_output = "<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<gallery>
";
$sql = "SELECT * FROM gallery ORDER BY ID DESC";
$resultID = mysql_query($sql) or die (mysql_error());
while ($row=mysql_fetch_assoc($resultID)) {
$xml_output .= " <item>
";
$xml_output .= " <description1>".str_replace(" "," ",htmlentities($row['TITLE']))."</description1>
";
$xml_output .= " <description2>".str_replace(" "," ",htmlentities($row['COMMENTS']))."</description2>
";
$xml_output .= " <link>".htmlentities($row['SRC'])."</link>
";
$xml_output .= " </item>
";
}
$xml_output .= "</gallery>
";
echo $xml_output;
?>
The Thai characters are getting stored as unicode, like so: (with out the spaces, damn forum was converting it for me)
& #3650;& #3619;& #3591;& #3586;& #3634;& #3618;& #3618;& #3634;
The XML is writing it just like that and Flash is seeing it just like that.
How do I get Flash/PHP to convert that to Thai?
Thanks,
Josh