[Zope] Re: How to convert Zope instance charset?

Max M maxm at mxm.dk
Sun Apr 24 12:26:25 EDT 2005


Andreas Jung wrote:
> 
>> Daniel Dekany wrote:
>>
>>> Sunday, April 24, 2005, 4:22:10 PM, Andreas Jung wrote:
>>
>>> Zope itself gives a method for sorting strings:
>>> DocumentTemplate.sequence.sort. Many of the products relies on that for
>>> sorting. And that sorts UTF-8 incorrectly
>>
>> Then it will probably be easiest to just patch it up to sort correctly.
>> Or file a bug in the collector.
> 
> A candidate for a reject. I pointed out that the sort method can not smell
> your encoding. If you deal with encodings and deal with it in the right way
> but don't expect that the underlying framework can smell or guess what kind
> of encoding your application uses. Otherwise: use Python unicode strings
> *only* and *overall*.


Yes. I was thinking in the line of a monkeypatch of the sort method, 
that could be used in eg. Plone.

It should be very possible for it to look up the charset under 
properties, and decode strings from that before sorting.


-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the Zope mailing list