[Zope-CMF] Re: [dev] encoding issues: showstoppers for the CMF 1.5
release?
yuppie
y.2004_ at wcm-solutions.de
Tue Oct 12 14:12:13 EDT 2004
Hi!
yuppie wrote:
>>> A.) RSS Syndication fail on non-ascii
>>> -------------------------------------
>>> http://collector.zope.org/CMF/261
>>>
>> [...]
>>
>> We could conceivably fix the first one by modifying the syndication
>> tool, making its 'getSyndicatableContent' method return a list of
>> dictionaries whose values were unicode strings. Or, we might add a
>> method, 'toUnicode', to the tool, and call that from within RSS.py.
>> In either case, the tool would for the context's 'default_encoding'
>> property; if found, it would be used to decode the value.
>
>
> - RSS.py fetches strings from different sources, so I'd propose to do
> the decoding there.
>
> - The implicit encoding used by Page Templates is ascii, so I think it
> wouldn't hurt to set it explicitly as default 'default_encoding'.
>
> Did I get you right that you'd prefer a context property over a site
> property? That makes things a bit more complex, but if there is a need
> to set the encoding depending on the context I'm fine with that.
I had a closer look at this. Using a context property is more complex
than I thought. For the values of each 'getSyndicatableContent' item we
have to call 'toUnicode' with that item as context. Same with other values.
If 'default_encoding' is a site property, we can call 'toUnicode' once
after assembling all the values.
So I would propose to add a 'toUnicode' function to utils that uses the
same site wide 'default_encoding' for all values.
Comments?
>>> B.) CMFSetup: import of type infos broken
>>> -----------------------------------------
>>> http://collector.zope.org/CMF/287
Checked in a basic fix that restricts im- and exports to ascii. Added a
feature request for providing non-ascii im- and exports:
http://collector.zope.org/CMF/292
Cheers,
Yuppie
More information about the Zope-CMF
mailing list