I am using a PHP connection to a MySQL database to create an XML file. Everything works except character encoding. I need both Japanese and English characters, so obviously I decided to use UTF-8. Only problem is that Japanese characters from the database are not displayed correctly.
The database and table settings are set to UTF8_general_ci, as well as the mapping of MySQL connections.
My php file defines the use of UTF-8 (and is stored in UTF-8 without specification) in 2 different places, once in the header with the following line: header ("Content-type: text / xml; charset = utf-8"); Another place that it defines is in the XML output file.
As a test, I had a php file that some Japanese characters write only from code, so it does not come from the database. This displays correctly (can be seen here http://jlearn.0sites.net/Flash/xml/xml.php ... the last 5 entries contain some Japanese followed by question marks because of the Japanese that should appear from the database )
So, the problem is most likely in the database, but everything looks right to me.
Any ideas?
Musera
source share