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

Link to comment
Share on other sites

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 />';
}

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.