Unicode error in Page Templates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Medium
|
Andreas Jung |
Bug Description
I add Page Template, set Content-Type to text/plain, output-encofing to koi8-r, write text with cyrillic characters and try to save it. And get an error:
Error Type: TypeError
Error Value: decoding Unicode is not supported
Environment:
management_
environment variable ZPT_PREFERRED_
overrides.zcml in /Products/
Error was gone after adding 2 lines in /Products/
replace
try:
return unicode(source, enc), enc
except UnicodeDecodeError:
with
try:
return unicode(source, enc), enc
except UnicodeDecodeError:
except TypeError:
Changed in zope2: | |
assignee: | nobody → ajung |
Changed in zope2: | |
status: | New → Confirmed |
Could you please work on a unittest?