[Zope] How to convert Zope instance charset?
Andreas Jung
lists at andreas-jung.com
Sun Apr 24 13:22:42 EDT 2005
--On Sonntag, 24. April 2005 18:34 Uhr +0200 Daniel Dekany
<ddekany at freemail.hu> wrote:
>
> Maybe *you* don't get the point. Python has a "virtual machine level"
> setting that specifies the locale and encoding (the charset). You can
> set it for example like: locale.setlocale('hu_HU', 'ISO-8859-2'). And
> although there is no charset information attached to strings,
> locale.strcoll and such will assume that the string is in the encoding
> specified globally like above, right? All the strings (which is not an
> unicode string) is assumed to use that encoding. It seems to me that it
> works like that until I specify 'UTF-8' in the locale, in which case it
> goes mad.
I am very much aware of the issue (btw. it was me who integrated
sequence.sort()). And if you look carefully at the API of sequence.sort()
then you will see that there is already built-in support locale-aware
comparisons.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050424/8ab25212/attachment.bin
More information about the Zope
mailing list