Kor
12-12-2011, 02:11 PM
I have to send some data from an XML file to a MySQL table. Some text there have French apostrophes (’), and I need to replace them with single quotes (')
I tried a lot of methods, including RegExp, with no success. No matter what I tried, the resulted character into the DB remains a question mark (?)
Additional Info:
- the XML is Microsoft Spreadsheet 2003 formatted. I get it from exporting an Excel 2007 Worksheet. I don't want to encode it manually as utf-8.
- I use the DOMDocument::load() method to read the XML file in PHP
- the fields of the MySQL table have the collation : latin1_swedish_ci. I can not change that.
Any ideas? Has anyone encounter this problem and found a solution?
I tried a lot of methods, including RegExp, with no success. No matter what I tried, the resulted character into the DB remains a question mark (?)
Additional Info:
- the XML is Microsoft Spreadsheet 2003 formatted. I get it from exporting an Excel 2007 Worksheet. I don't want to encode it manually as utf-8.
- I use the DOMDocument::load() method to read the XML file in PHP
- the fields of the MySQL table have the collation : latin1_swedish_ci. I can not change that.
Any ideas? Has anyone encounter this problem and found a solution?