Am 10.01.2008 um 11:54 schrieb Jens Vagelpohl:
It may be helpful if you describe what you were trying to do and
what failure you're seeing so everyone has a little context for
this request, which AFAIK has never come up anywhere.
:oops: Sorry, I thought this was a known issue.
If I have non-ASCII data in an RDBMS that I wish to use in a CMF site
or even straight ZPT's you get a UnicodeError when accessing the non-
ASCII Values which you get around using the decode utility.
<tal:repeat repeat="result context/someSQLQuery"> <- or from **options
This will raise
Error Type: UnicodeDecodeError
Error Value: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)
For something coming from a UTF-8 database to a UTF-8 site with
zpublisher-default-encoding set to UTF-8
NB. content="result/name" doesn't raise the error
Actually this might not be anything to do with the CMF but simply the
that I have discussed a bit with Andreas but lost the bug id. Which
I've now found again: https://bugs.launchpad.net/zope2/+bug/143932
However, I think the error is raised because utils.decode simply
returns any values untouched it doesn't know what to do with which is
why I think it might be worth extending. OTOH it might something that
is better fixed in the Shared.RDBMS.Results module
Clearer or muddier now?
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests