[Zope-dev] [ZOPE 2.6 B1] Unicode/locale problems withOFS/dtml/properties.dtml
Hajime Nakagami
nakagami@da2.so-net.ne.jp
Fri, 27 Sep 2002 11:42:17 +0900
Hi
I'm Japanese.
#Sorry so I don't write english well.
>> While I'm quite sure that this will help Zope in the Asiatic region, it
>> seems quite inconvienent for isolatin1 world :(
>
>This will be a win in Europe as well, especially for multilingual sites. IIRC there are 15 variants of ISO-8859-1.
>
>I18N is *very* important, and Unicode is an essential ingredient.
[1] These 3 filses (total 3 line) change
from "encode('latin1')" to "encode('utf-8')"
$find . -name '*.py' -exec grep -l 'encode.*latin1' {} \;
./lib/python/ZPublisher/Converters.py
./lib/python/ZPublisher/HTTPRequest.py
./lib/python/ZPublisher/HTTPResponse.py
[2] This line change from 'iso-8859-1' to 'utf-8'
lib/python/App/dtml/manage_page_header.dtml
<dtml-call "REQUEST.set('management_page_charset','iso-8859-1')">
These changes seems well work for me.
But I have not enough test.
Are there some reason to treat unicode string not as 'utf-8' but as 'latin1'(iso-8859-1)?
Additionaly
Japanese languese have some encoding,
euc-jp, shift_jis, iso-8859-jp and utf-8 (and another?).
I want mechanism to change encoding dinamically.