Jump to content

charset problem needing out-of-the-box solution


ricmetal

Recommended Posts

hi

 

i am calling some text from a database with php and echoing it to flash. i have no idea the charset anything is in. all i can see is that calling the text from the database and placing into flash yields in some missing chars, but if echo the called text to the browser, copy it and echo that to flash, all characters appear. now, i kow this is not a flash forum, and im not going to ask for a flash solution because there's just too many different charsets and code i cannot control/ nor see so i was thinking of doing something along the line of having php creating a clone of the copied text that appears in the browser, and having it echo that text to flash. it there something php can do, similar to what i described?

 

regards

You can ask the database to show you the collation of the table for the character set.

 

$sql = "SHOW TABLE STATUS FROM $database LIKE '$table'";
$result = mysql_query($sql) or trigger_error($sql . ' encountered an error!<br />' . mysql_error());
$row = mysql_fetch_assoc($result);
foreach($row as $key => $value) {
echo $key . ' = ' . $value . ' <br />';
}

 

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.