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
  • have you tried using utf-8 / utf8_general_ci as encoding on the importscript? If yes, result? Commented May 26, 2014 at 13:27
  • Yes iI was trying to convert script file by this method stackoverflow.com/questions/11303405/… nothing happend :| Commented May 26, 2014 at 18:22

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 you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.