Re: [Zope-dev] 2.7 management_page_charset cannot be callable anymore

2004-01-16 Thread Hajime Nakagami
Hi 

Hi guys - 

I was trying to be responsive to getting the issue resolved, since
I'd like to make a (hopefully final) beta of 2.7 of Friday. I'll be 
happy to check in (or have you check in) whatever fixes are needed 
to give you the flexibility you need so long as it is b/w compatible, 
but I won't have the time to actively figure out what those fixes 
are this week.

If you or Hajime can send me a patch against the current 2.7 
branch, I'll make sure they get in before the beta is cut (or if 
either of you are committers it is also fine to checkin yourselves 
to the Zope-2_7-branch and head and let me know when its done).

I have checkout 2.7 branch and test.

And now seems good works for me.
http://cvs.zope.org/Zope/lib/python/OFS/dtml/properties.dtml.diff?r1=1.8.18.6r2=1.8.18.7
Thanks a lot Brian.

Is it good for you, Martijn ?

Regards,
Hajime Nakagami

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] 2.7 management_page_charset cannot be callable anymore

2004-01-15 Thread Hajime Nakagami
Hi

Brian Lloyd wrote:
 I forward-ported these to the 2.7 branch  the head. Any testing 
 you can do to make sure I didn't break anything would be appreciated.
 

Now I understand that you were responding to these messages:

  I think the problem is same as reported by Kazuya Fukamachi
  http://mail.zope.org/pipermail/zope-dev/2003-December/021315.html
  and me.
  http://mail.zope.org/pipermail/zope-dev/2003-December/021338.html

Fixing properties.dtml does not fix the problem that
management_page_charset cannot be a callable anymore. This means that 
any logic to determine the right charset to use in displaying a page
will fail to work (with an error) in Zope 2.7.(This can be fixed by
rewriting the code to use a ComputedAttribute for management_page_charset.)

So my problem and Hajime's may be different? Hajime?


Sorry I have not execute Zope 2.7 or HEAD now.
But I think needs not only the patch, 
http://cvs.zope.org/Zope/lib/python/OFS/dtml/properties.dtml.diff?r1=1.14r2=1.15
but also below
--
Index: properties.dtml
===
RCS file: /cvs-repository/Zope/lib/python/OFS/dtml/properties.dtml,v
retrieving revision 1.15
diff -c -r1.15 properties.dtml
*** properties.dtml 14 Jan 2004 20:07:01 -  1.15
--- properties.dtml 15 Jan 2004 12:17:50 -
***
*** 5,10 
--- 5,11 
  around. This means that this feature is not likely to be supported
  in all future versions of zope.
  /dtml-comment
+ dtml-call REQUEST.set( 'management_page_charset',management_page_charset)
  dtml-call REQUEST.set('management_page_charset_tag','')
  dtml-else
  dtml-comment


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] 2.7 management_page_charset cannot be callable anymore

2004-01-14 Thread Hajime Nakagami
+1

I think the problem is same as reported by Kazuya Fukamachi
http://mail.zope.org/pipermail/zope-dev/2003-December/021315.html
and me.
http://mail.zope.org/pipermail/zope-dev/2003-December/021338.html

At least this is important problem in Japanese (maybe Korea and Chinese) 
developpers.


Hi there,

Some changes in Zope 2.7 break the possibility to make management_page_charset
a callable (for instance a method). 

This breaks Formulator, as it uses this facility. This works just fine
in Zope 2.6, but breaks in Zope 2.7.

The silly thing is that Formulator 2.6.0 breaks in Zope 2.7 exactly because
it actually is the release that tries to do unicode *right* (while still
retaining backwards compatibility with older installations and offering
a non-unicode mode), and then Zope 2.7 makes it impossible.

I heard a report that a similar problem may be occuring with ZWiki..

The problem is in lib/python/App/dtml/manage_page_header.dtml:

dtml-unless management_page_charset
dtml-call REQUEST.set('management_page_charset','iso-8859-1')
/dtml-unless
meta http-equiv=content-type 
content=text/html;charset=dtml-management_page_charset;
dtml-call 
RESPONSE.setHeader('content-type','text/html;charset='+management_page_charset)

If I remember my DTML well, dtml-management_page_charset; should still call
the method if it's a callable, so that would be all right. 

The next line however breaks, as it's going to treat my method as an attribute.

I think backwards compatibility got broken unintentionally here.. Could
this be restored? Using a ComputedAttribute for this would be rather
involved and it's possible other products are broken as well as a 
result.

Regards,

Martijn

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] properties.dtml has a problem

2003-12-30 Thread Hajime Nakagami
I think so, I hope merge codes to 2.7.

I want upper compatibility.

I have some logics treat with EUC-JP encoding now.
So if encoding set to UTF-8 automatically, I can't upgrade to 2.7.

I've started to use Zope-2.7b3 and found:
In Zope-2_7-branch and MAIN-branch, lib/python/OFS/dtml/properties.dtml
has a problem.

We cannot set non-UTF-8 characters to properties, because the first line,
dtml-call REQUEST.set('management_page_charset','UTF-8')
enforce to use UTF-8, etc..

I think Toby Dickenson's modification to Zope-2_6-branch have not reflected
to Zope-2_7-branch and MAIN-branch.

http://cvs.zope.org/Zope/lib/python/OFS/dtml/properties.dtml.diff?r1=1.12.16
.1r2=1.8.18.6
http://cvs.zope.org/Zope/lib/python/OFS/dtml/properties.dtml.diff?r1=1.14;

It would be appreciated if the modification would be merged.
If there is any reason to avoid it, would someone explain why.

Best Regards,
Kazuya Fukamachi

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope 2.6.0 ZMI Problem for CJK(Collector 623) patch.

2002-11-27 Thread Hajime Nakagami

Hi !
 Zope 2.6.0 have a problem for non 'iso-8859-1' user.
And Collector 623 is still incollect now.
http://collector.zope.org/Zope/623

It's serious problem for CJK(I'm Japanese).
So I make patch for 2.6.0.

http://www005.upp.so-net.ne.jp/zope260-i18n-20021123.diff

1.Install
$ cd $(INST_HOME)
$ patch -p0 zope260-i18n-20021123.diff

2.Usage
Set attribute 'default_charset'(string type) as 'foo' some Folder object.
And after you can set 'foo' charset in the Folder object via ZMI.

3.Attension
  Python need to recognize 'foo' encoding.
  (You need install adaptable Codec)

I try with 'euc-jp' charset, and I think any charset is available.
(But my browser can request only Japanese encoding charset.)

thanks

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Zope 2.6.0 ZMI Problem for CJK(Collector 623) patch.

2002-11-27 Thread Hajime Nakagami
Sorry

http://www005.upp.so-net.ne.jp/nakagami/zope260-i18n-20021123.diff

http://www005.upp.so-net.ne.jp/zope260-i18n-20021123.diff


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] SSL Server integrated to Zope

2002-11-13 Thread Hajime Nakagami
Hi!

I try to hack SSL Server integreted to Zope.
http://www.zope.org/Members/nakagami/zSSL

#I wan't to use M2Crypto, Because It's difficult to me.

I don't have enoght test, And I only tested on Cygwin.
But I think zSSL good for several platform and some version
(Probably 2.5 and later) of Zope.

Please someone test that and send comment to me.

PS.
I have heard from a Linux Box user that when large page saved,
zSSL came to stop.
Is it blocking I/O ? race condition ?, please someone teachme.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] [ZOPE 2.6 B1] Unicode/locale problems withOFS/dtml/properties.dtml

2002-09-26 Thread Hajime Nakagami

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.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )