Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] Odoo - WooCommerce Import fields on cyrillic as unicode #14

Open
Vassy opened this issue Feb 2, 2016 · 8 comments
Open

[8.0] Odoo - WooCommerce Import fields on cyrillic as unicode #14

Vassy opened this issue Feb 2, 2016 · 8 comments

Comments

@Vassy
Copy link

Vassy commented Feb 2, 2016

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.

odoowoo

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 Vassy changed the title [8.0] Import fields on cyrillic [8.0] Odoo - WooCommerce Import fields on cyrillic Feb 2, 2016
@parthivgls
Copy link

@Vassy can you provide me with some sample data to test with.

@Vassy
Copy link
Author

Vassy commented Feb 3, 2016

@parthivgls I create categoryes (woo): SPA процедури
with product: Уикенд Романтично вълшебство за двама възрастни и едно дете
with description: Изживейте магията на един романтичен уикенд на вълшебно и необикновено място!
and short description: РЕЛАКС

@Vassy
Copy link
Author

Vassy commented Feb 8, 2016

@parthivgls any suggestions?

@WO15
Copy link

WO15 commented Feb 15, 2016

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 П.

@Vassy
Copy link
Author

Vassy commented Feb 27, 2016

@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).

@Vassy Vassy changed the title [8.0] Odoo - WooCommerce Import fields on cyrillic [8.0] Odoo - WooCommerce Import fields on cyrillic as unicode Feb 27, 2016
@WO15
Copy link

WO15 commented Mar 3, 2016

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'))

@SteffCGN
Copy link

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

@fescon
Copy link

fescon commented May 24, 2016

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants