[z3-five] unicodes and strings in Zope 2.9's ZPT with Zope 3's i18n
Chris Withers
chris at simplistix.co.uk
Tue Jul 25 11:46:27 CEST 2006
Maciej Wiśniowski wrote:
> I've already found some examples of sitecustomize.py that
> change defaultencoding.
> We're using windows and linux so it may be unportable, but
> I think it may be still helpful in some cases.
I don't think the OS has anything to do with this...
> Maybe it should be a option in zope.conf that will allow to
> change this behaviour.
nah, it needs to happen way before then, hence sitecustomize.py
>> Unicode is more fun also.
>>
> But is more difficult especially for begineers and
> especially in Zope2. It's a bit strange to write
> strings with u'. I've never seen this in other languages.
Yes, Python 3000 will fix this...
> for data stored in attributes and for data
> retrieved from database and be careful to use
> u'...' strings instead of '...'.
Well, that's only true for constants. Otherwise, you just need to make
sure you turn strings into unicodes as soon as possible...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the z3-five
mailing list