Reputation: 2837
I'm using magento 1.7.0 in Spanish language. When export the CSV file form sales order.The Spanish character are changed. I have found the reason for that. During the export to csv the charset is set to western europe. So now i need to change that to UTF-8.
How to change that.
Upvotes: 5
Views: 3434
Reputation: 930
Check default charset on your server (PHP, apache/nginx). If there everything looks ok, add <charset>utf8</charset>
to database section in app/etc/local.xml
, then default_section should looks like:
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[root]]></username>
<password><![CDATA[]]></password>
<dbname><![CDATA[magento]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
<charset>utf8</charset>
</connection>
</default_setup>
Hope it helps! Long time ago this charset tag solved some nasty encoding problems in my Magento installation :)
Upvotes: 5