#6 — UnicodeEncodeError
by Max Bloechle — last modified Jun 09, 2009 11:23 PM
|Submitted by||Max Bloechle|
|Submitted on||Jun 02, 2009|
|Responsible||Maurits van Rees|
Hi, entering an Umlaut in @@reb-controlpanel and trying to edit an real estate throws an error "'ascii' codec can't encode character u'\xd6' in position 0: ordinal not in range(128)". I have come accross the UnicodeQuickFix, but I am not sure if this is the right way to go. Any hints? Thank you!
Added by Max Bloechle on Jun 02, 2009 09:22 AMIt looks similar to
Added by Maurits van Rees on Jun 08, 2009 09:28 PMHello Max,
In which field are you adding that Umlaut? In the cities field I changed Paris into Päris and I could still edit a real estate.
What is the default charset of your Plone Site? See the default_charset property in portal_properties/site_properties. Should be utf-8 usually.
Can you post the complete traceback you get?
Added by Max Bloechle on Jun 09, 2009 01:10 PMHi Maurits,
sorry I wasn't clear, I was assuming it applies to all the fields, however I was wrong. Adding an Umlaut to the cities field works fine but not for example the "Heating" field.
The default_charset property in plone is set to utf-8 (the default) and python is set to ascii:
>>> import sys
Please find attached the traceback. Thank you!
Added by Maurits van Rees on Jun 09, 2009 11:23 PMAh, so this goes wrong in browser/vocabularies.py. In the CityVocabularyFactory in that file we use an own unicode_vocabulary instead of the default SimpleVocabulary. For some reason we do not do that in most of the other vocabularies there. Since I can indeed not think of a reason for that I changed the code to use the unicode_vocabulary in all vocabularies.
Issue state: Unconfirmed → Resolved
Responsible manager: (UNASSIGNED) → maurits
Fixed in r87803 on trunk. Can you test that code? Hm, I might as well just release a new versions on the python package index. Done: http://pypi.python.org/pypi/collective.realestatebroker/2.2
No responses can be added.
If you can, please log in before submitting a reaction.