ricmetal Posted April 4, 2012 Share Posted April 4, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/260363-charset-problem-needing-out-of-the-box-solution/ Share on other sites More sharing options...
jcbones Posted April 5, 2012 Share Posted April 5, 2012 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 />'; } Quote Link to comment https://forums.phpfreaks.com/topic/260363-charset-problem-needing-out-of-the-box-solution/#findComment-1334513 Share on other sites More sharing options...
ricmetal Posted April 5, 2012 Author Share Posted April 5, 2012 thanks that might come in handy Quote Link to comment https://forums.phpfreaks.com/topic/260363-charset-problem-needing-out-of-the-box-solution/#findComment-1334518 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.