[Zope-dev] Zope 2.6.0 ZMI Problem for CJK(Collector 623) patch.
Kazuya FUKAMACHI
kf@atransia.co.jp
Wed, 11 Dec 2002 11:15:37 +0900
On Tue, 10 Dec 2002 12:12:19 -0800
Heiichiro NAKAMURA <nheiich@quantumfusion.com> wrote:
> -----------------------------------------------------------------------
> 2) Russian patch:
> http://itconnection.ru/pipermail/zopyrus/2002-November/001388.html
+0.5
i) I like such an approach.
- <select name="<dtml-var id>:utf8:text">
+ <select name="<dtml-var id>:<dtml-var management_page_charset>:text">
i') using newly implemented function management_page_charset_default(),
it can set the value of default management_page_charset.
This avoids hard coding of default value.
ii) but this patch may have a few troubles in Japnanese environment.
This code returns 'eucJP' in many Japanese environment.
charset = locale.getlocale()[1]
And
codecs.lookup(charset) ==> codecs.lookup('eucJP')
will fail, because there are no entry for 'eucJP', but 'euc-jp'
and 'ujis'. I think it is possible to add 'eucJP' entry to
JapaneseCodecs as an alias for 'euc-jp'. So, it's not a big problem.
(I don't know why JapaneseCodecs doesn't have 'eucJP' alias.)
If the problem above has been solved,
the value of management_page_charset maybe set to 'eucJP',
and it leads to another problem.
If management_page_charset returns 'eucJP', then header should be
RESPONSE.setHeader('Content-Type','text/html; charset=eucJP')
It is not common way as a Content-Type header.
We prefer
RESPONSE.setHeader('Content-Type','text/html; charset=EUC-JP')
And also, it does not work in Windows environment.
This code returns (None, None).
locale.getlocale()[1]
iii) I guess modification to class PropertyManager seems
to fix http://collector.zope.org/Zope/697
Basically, it's interesting approach, but still needed to be brush up.
> 5) Toby's proposal
I hope +1.
I'm not satisfied with (1)-(4).
So, I would like to wait for Toby's implementation.
1) Nakagami Patch:
http://lists.zope.org/pipermail/zope-dev/2002-November/018177.html
As I wrote sometime ago, this approach has problems.
3) TAHARA's patch:
http://lists.zope.org/pipermail/zope-dev/2002-November/018198.html
He said;
Fri, 06 Dec 2002 11:30:39 +0900
Sorry, I noticed that my patch is defective.
It is failure when object has own Property:-(
4) Rollback approach:
Rollback some hassle code back to old & safe one.
This is the last resort.
Regards,
Kazuya Fukamachi