[8.0] Odoo - WooCommerce Import fields on cyrillic as unicode
Opened this issue · 8 comments
When I import categories with names in Cyrillic, in odoo look like "\ u041f \ u043e \ u0432 \ u043e \ u0434". When product names are only in Cyrillic, the import does not work. If product names or descriptions contain Cyrillic and Latin names their import, but only Latin characters.
PHP 5.5
Wordpress - 4.4.1
WooCommerce - 2.5.1
Connector Woo Odoo By Tech-Receptives - 2.4.8
connector-woocommerce - from here [8.0]
Odoo - 8.0 - september 2015
@Vassy can you provide me with some sample data to test with.
@parthivgls I create categoryes (woo): SPA процедури
with product: Уикенд Романтично вълшебство за двама възрастни и едно дете
with description: Изживейте магията на един романтичен уикенд на вълшебно и необикновено място!
and short description: РЕЛАКС
@parthivgls any suggestions?
When I try to import a product name containing the degree sign ° . I see \u00b0 in Odoo.
u00B0 is the Unicode number for the degree sign. http://unicode-table.com/en/00B0/
Seems WooCommerce sent Unicode but Odoo is not recognizing it as being Unicode and displaying it literally. First character in first post above is http://unicode-table.com/en/search/?q=041f which is Cyrillic character П.
@WO15 Did you decide this problem? I tested Woocommerce API with https://github.com/kloon/WooCommerce-REST-API-Client-Library and xmlrpc returns unicode (\u0xxx \u0xxx ...). I think the problem is in Woocommerce API (WP API).
I did also test the api directly. see script below.
when using .decode('unicode-escape') the characters are displayed as real Unicode characters instead of escaped Unicode numbers.
However I am not sure where to make this change in the Odoo Woocommerce module to have correct Unicode text in Odoo instead of ASCII text mixed with escaped Unicode codes.
#!/usr/bin/python
# -*- coding: utf-8 -*-
#Python script to download and display information from WooCommece via the API
# based on https://github.com/woothemes/wc-api-python/blob/master/README.rst
# (api) version is set to v2 default is v3 (v3 is used when you don't specify a version)
from woocommerce import API
wcapi = API(
url="http://domain.com",
consumer_key="ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
consumer_secret="cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
version="v2"
)
# read all customers
c = wcapi.get("customers")
# displays consumer data with unicode characters escaped as \u03c0 (pi character)
print (c.text)
# displays consumer data with unicode characters displayed as "real" characters π (pi character)
print(c.text.decode('unicode-escape'))
Probably the same issue here.
German WooCommerce Shop with German umlauts (äöüßÄÖÜ etc.) in product names and categories.
When I import into Odoo 8.0 all umlauts are displayed as unicode (\u00e4 for ä).
Any ideas anybody?
Thanks in advance,
Stefan
Same here