Re: [Zope] How to convert Zope instance charset?
Monday, April 25, 2005, 5:34:04 AM, Andreas Jung wrote:
One last note from myside. I have experiences with unicode since over 7 years while working with multilingual documents in the e-publishing business. It is good practice to perform *any* unicode related work *only* on unicode datatypes (Python unicode strings!!!) and *not* some byte-encoded unicode strings as utf8 or whatever. These encodings should only be used on the output level when presenting unicode data to the user - either through-the-web, as export format etc. This is a strong advice you should follow.
As someone who works often with Java I absolutely agree with it. Just I don't know how to do it with Zope/Plone/other 3rd party products (not written by me), since they use not unicode strings. I don't know, maybe it can be specified for Python that it uses unicode for plain strings as well, but anybody has successfully done that with Zope? Like, what about the C parts of Zope then?
-aj
-- Best regards, Daniel Dekany
--On Montag, 25. April 2005 10:42 Uhr +0200 Daniel Dekany <ddekany@freemail.hu> wrote:
As someone who works often with Java I absolutely agree with it. Just I don't know how to do it with Zope/Plone/other 3rd party products (not written by me), since they use not unicode strings. I don't know, maybe it can be specified for Python that it uses unicode for plain strings as well, but anybody has successfully done that with Zope? Like, what about the C parts of Zope then?
Well back in the history of Zope there was only ascii and Python had no unicode support. Unicode support moved into Zope over time. Some parts are still having problems and these problems will never be solved completely. The sources are just too old. But there is usually a good way to get around a particular problem. Zope 3 in contrast uses Unicode everywhere...so it is clean by design. Unfortunately there is no magic treat-all-my-strings-as-unicode-strings in Python. So if you still have a specific problem ask again and we might help. In your case it should be easy to convert your utf8 data to unicode strings and sort then using the existing methods. Andreas
participants (2)
-
Andreas Jung -
Daniel Dekany