I have a typical ZPT form that redisplays entered data if invalid data is
entered:
Unfortunately it throws a Unicode exception if a Czech accented character is
entered. Such as "s" with a hacek. Or "c" with a hacek. Possibly applies to
many other languages as well. Is there a workaround?
Zope 2.8.5, Plone 2.1.2, Python 2.3.5, Linux 2.6.12
UnicodeDecodeError
'ascii' codec can't decode byte 0xc4 in position 0: ordinal not in range(128)
Full error log:
* Module ZPublisher.Publish, line 113, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 40, in call_object
* Module Shared.DC.Scripts.Bindings, line 311, in __call__
* Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
* Module Products.PythonScripts.PythonScript, line 323, in _exec
* Module None, line 14, in demand
Line 14
* Module Shared.DC.Scripts.Bindings, line 311, in __call__
* Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
* Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec
* Module Products.PageTemplates.PageTemplate, line 104, in pt_render
* Module TAL.TALInterpreter, line 206, in __call__
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 711, in do_useMacro
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 426, in do_optTag_tal
* Module TAL.TALInterpreter, line 411, in do_optTag
* Module TAL.TALInterpreter, line 406, in no_tag
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 742, in do_defineSlot
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 426, in do_optTag_tal
* Module TAL.TALInterpreter, line 411, in do_optTag
* Module TAL.TALInterpreter, line 406, in no_tag
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 690, in do_defineMacro
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 734, in do_defineSlot
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 426, in do_optTag_tal
* Module TAL.TALInterpreter, line 411, in do_optTag
* Module TAL.TALInterpreter, line 406, in no_tag
* Module TAL.TALInterpreter, line 250, in interpret
* Module TAL.TALInterpreter, line 308, in do_startTag
* Module TAL.TALInterpreter, line 396, in attrAction_tal
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 0:
ordinal not in range(128)
--
Milos Prudek
___
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )