[TYPO3-dev] UTF8 problem when parsing XML data...

Jigal van Hemert jigal.van.hemert at eurorscg.nl
Fri Jul 14 09:07:32 CEST 2006


> From: Oliver Wand
> Jigal van Hemert wrote:
> > 
> > It is very unlikely that the browser is responsible for both. Since 
> > the default internal encoding
> for PHP 4.x is ISO-8859-1 I suspect that the document was 
> handled in internal encoding by PHP after
> 
> Well as I told before the setup is PHP5. So this can´t be 
> related to PHP4.

No, but it should trigger you to look up the default settings for PHP5 and for your installation of PHP!

> The xml data is loaded with simple_xml which is a php5 feature.

Fine. Maybe you can lookup simple_xml in the PHP manual and see what options there are for defining source and target encoding?

> > If the transformed document was stored in a database and 
> the database 
> > client and/or the server
> were not set correctly it could be the case that utf-8 
> encoded data is returned as if
> 
> The DB is set to UTF-8.

You're on your way. Please do read the rest of the MySQL manual about character sets and encoding:
For MySQL 4.x:
http://dev.mysql.com/doc/refman/4.1/en/charset.html
and especially:
http://dev.mysql.com/doc/refman/4.1/en/charset-connection.html

(on the left in the online manual is a green block where you find links to the current page in the manuals for 5.0 and 5.1 if you happen to use those versions.)

It's not enought to set the server/datbase/table to utf-8. Communication with MySQL is done through a "client"; the client and the server must be set correctly to get the data in and out of the database in the right character set and encoding.

Please realize that we cannot see your code, your database, typo3 configuration, server configuration, etc.. You should find the problem yourself, but we can show you some directions where you might find a solution. Still you have to do the investigation yourself!

Regards, Jigal.




More information about the TYPO3-dev mailing list