0

I have problem with magento and encoding :( i've created php script which imports products into magento (by php api). Almost everything is fine.... BUT after import i don't have polish characters in product details ;( only some strange characters.... While import script is running i make var_dump on product name and evetything is fine (i have proper polish signs in script output). My local.xml contains:

<initStatements><![CDATA[SET NAMES utf8]]></initStatements>

Database setup is proper too, all database/tables has proper encoding (utf8). After manual product creation on Magento backend i have proper polish chars in product details.

I've checked script encoding and everything is ok (US-ASCII -- is -- a subset of UTF-8)

importProducts.php: text/x-php; charset=us-ascii

Any other ideas?


EDIT:

Ok, I,ve solved the problem! The solution was append

<charset>utf8</charset>

to database configuration in local.xml,

2

2 Answers 2

2

My script had issues with the utf8mb4 charset... It worked fine inside mysql with the utf8mb4_unicode_ci coalition on the table, database and column. The problem turned out to be that app/etc/local.xml is cached somewhere in magento. Clicking flush cache fixed the problem.

to reiterate

<initStatements><![CDATA[SET NAMES utf8mb4]]></initStatements>

should work.

0

Ok, I solve problem! The solution was simple, just append

<charset>utf8</charset>

to database configuration in local.xml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.