It could be an encoding issue on that end. If flash/php is (for example) encoding these characters as UTF-8 when they are inserted into the database, but the database is expecting Latin-1, it will still work. And if the application retrieves the text later and displays it - that will work also. However if a different app that is working correctly with the encoding tries to interact with the data, you'll see that some of these characters look like gibberish.
The key is that the HTML form, the PHP script, and the MySQL database have to be aligned on the type of encoding to use in a given request. The database need not be encoded as UTF-8. MySQL can set the input/output encoding at runtime via the
character_set_client
character_set_results
and names
variables. Here is a snippet from Dataface_Application where Xataface sets this:
- Code: Select all
if ( $this->_conf['oe'] == 'UTF-8' ){
$res = mysql_query('set character_set_results = \'utf8\'', $this->_db);
mysql_query("SET NAMES utf8", $this->_db);
}
if ( $this->_conf['ie'] == 'UTF-8' ){
$res = mysql_query('set character_set_client = \'utf8\'', $this->_db);
}
This must be done to tell mysql that it is working in UTF-8 for this request.
Do you know whether your flash script and PHP script are working with the data as utf-8 or latin-1?
My prediction to support this hypothesis is: If you try to enter a record via Xataface using special characters, they will come out looking right in Xataface. But in your Flash app they will probably look gibbled.
-Steve