UnicodeDecodeError in ActionInformation.py
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope CMF buildout |
Confirmed
|
Low
|
Charlie_X |
Bug Description
Plone 3.1.5.1, CMF 2.1.1
We see the following error when the "Home" action within the portal_tabs category contains a string with umlauts inside the 'Title':
UnicodeDecodeError
Sorry, a site error occurred.
Traceback (innermost last):
* Module ZPublisher.Publish, line 202, in publish_
* Module ZPublisher.Publish, line 150, in publish
* Module plone.app.
* Module Zope2.App.startup, line 221, in zpublisher_
* Module ZPublisher.Publish, line 119, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 42, in call_object
* Module Shared.
* Module Shared.
* Module Products.
* Module Products.
* Module Products.
* Module zope.pagetempla
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tal.
* Module zope.tales.tales, line 696, in evaluate
URL: file:/home/
Line 8, Column 0
Expression: <PathExpr standard:
Names:
{'container': <PloneSite at /mm>,
'context': <ATDocument at /mm/front-page>,
'default': <object object at 0x2ba921100200>,
'here': <ATDocument at /mm/front-page>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.
'request': <HTTPRequest, URL=http://
'root': <Application at >,
'template': <FSPageTemplate at /mm/document_view used for /mm/front-page>,
'user': <PropertiedUser 'admin'>}
* Module zope.tales.
* Module Products.
* Module Products.
* Module Products.
* Module Products.
* Module plone.memoize.view, line 55, in memogetter
* Module plone.app.
* Module Products.
* Module Products.
* Module Products.
* Module Products.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128))
> /home/develop/
-> lazy_map[id] = val
(Pdb) args
self = <Action at index_html>
(Pdb) list
150 elif self.i18n_domain and id in ('title', 'description'):
151 try:
152 val = Message(val, self.i18n_domain)
153 except:
154 import pdb; pdb.set_trace()
155 -> lazy_map[id] = val
156
157 return (lazy_map, lazy_keys)
158
159 InitializeClass
160
(Pdb) print val
üöä
(Pdb) repr(val)
"'\\xc3\
'val' passed to Message() is a valid UTF-8 string (üöä in German). The Plone site encoding is UTF8 and also the browser shows UTF-8 as encoding for the ZMI pages.
Changed in zope-cmf: | |
assignee: | nobody → Charlie_X (charlie) |
Importance is low because usually message IDs are ascii strings.
Non-ascii properties are encoded using the default- zpublisher- encoding, which is iso-8859-15 by default and utf-8 in Plone. ZMI page encoding and site encoding are not relevant here.