How can I convert German characters during XML read and PHP write into mysql?

Posted by kitenski on Stack Overflow See other posts from Stack Overflow or by kitenski
Published on 2010-06-16T08:46:39Z Indexed on 2010/06/16 10:02 UTC
Read the original article Hit count: 261

Filed under:
|
|

Morning,

I am inputting data from an XML file into my database, but have any isse with German words (that are in the XML by mistake)

For example the word für appears in my XML as für and thus appears the same in my database.

I know I could do a simple search/replace for that exact phrase, but I was wondering if there was a smarter way to do it as I can't predict if any other German words may one day appear in the XML?

ADDING SOME MORE DETAIL

The XML source says: and in my PHP I have

$domString = utf8_encode($dom->saveXML($element));

If I look into the XML file before I start reading it, it has -

 <title> - <![CDATA[ CoPilot Live v8 Europa für Android 8.0.0.644 ]]> </title> 

Thanks.

Greg

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php5