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.6&r2=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-16 Thread Toby Dickenson
As the originator of management_page_charset, I should have jumped into this 
thread earlier. My appologies for my late arrival.

On Thursday 15 January 2004 17:22, Martijn Faassen wrote:

> it assumes the only place
> management_page_charset can be coming from is a property, which is
> not true.

Ive missed the use case that needs this.

management_page_charset was added as a transition aid for people who already 
had sites where their use of the management interface assumed something other 
than latin-1 was used for plain string properties. That is, a transition 
towards using unicode objects for storing all natural language strings.

I wouldnt like to see management_page_charset grow into something bigger than 
this - its too ugly.

> Considering the amount of rewriting necessary to make this saner and the
> scariness of doing that just before a Zope 2.7 release, I'll skip it
> and live with my Formulator hack solution.

Can you point me to a desicription of this hack please.

-- 
Toby Dickenson


___
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 kf
> -Original Message-
> > 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.d
> iff?r1=1.14&r2=1.15
> > but also below
> [patch to properties.dtml]
> 
> To repeat: patching properties.dtml will never be able to solve the
> backwards compatibility breakage involving management_page_charset not
> being treated as a callable (if possible) anymore.
> 
> It sounds therefore that Hajime and I are talking about two different
> things.

 
 
 A site-global encoding specification in a property.
 Note that this feature only works if there are no unicode
objects
 around. This means that this feature is not likely to be
supported
 in all future versions of zope.
 
+   
 
 

It seems we need one more line ;-)
Without this line, you cannot set management_page_charset form
ZMI-properties tab.

Thanks for all,
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 )


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

2004-01-15 Thread Clemens Robbenhaar

Brian Lloyd writes:

 > 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).

Here is a patch that solves the issue with "manage_page_charset" not
beeing called if it is a method instead of a string-valued attribute:

Index: lib/python/App/dtml/manage_page_header.dtml
===
RCS file: /cvs-repository/Zope/lib/python/App/dtml/manage_page_header.dtml,v
retrieving revision 1.12
diff -w -u -r1.12 manage_page_header.dtml
--- lib/python/App/dtml/manage_page_header.dtml 22 Dec 2002 17:53:57 -  1.12
+++ lib/python/App/dtml/manage_page_header.dtml 15 Jan 2004 17:17:50 -
@@ -5,7 +5,7 @@
 
 
 
-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 Martijn Faassen
Brian Lloyd wrote:
> 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.

Understood. I just spent some time gazing at what needs to be done
in properties.dtml (as well as manage_page_header.dtml), but frankly
the grotty DTML scares me and I already figured out a seemingly working
solution using ComputedAttribute in Formulator...

Fixing manage_page_header.dtml should be easy enough, just a one line fix:



i.e. the use of _['management_page_charset']

properties.dtml however has some logic *before* manage_page_header gets
called, and doesn't seem to deal propertly with the case where
management_page_charset is manually set to UTF-8 (it doesn't go to 
UTF-8 mode in that case, I think..), and it assumes the only place
management_page_charset can be coming from is a property, which is
not true. 

Considering the amount of rewriting necessary to make this saner and the 
scariness of doing that just before a Zope 2.7 release, I'll skip it
and live with my Formulator hack solution.

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] 2.7 management_page_charset cannot be callable anymore

2004-01-15 Thread Brian Lloyd
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).


Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716  
Zope Corporation   http://www.zope.com 


> -Original Message-
> From: Martijn Faassen [mailto:[EMAIL PROTECTED] Behalf Of Martijn
> Faassen
> Sent: Thursday, January 15, 2004 6:41 AM
> To: Brian Lloyd
> Cc: Hajime Nakagami; [EMAIL PROTECTED]
> Subject: Re: [Zope-dev] 2.7 management_page_charset cannot be callable
> anymore
> 
> 
> 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?
> 
> 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] 2.7 management_page_charset cannot be callable anymore

2004-01-15 Thread Martijn Faassen
Hajime Nakagami wrote:
> Hi

> 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.14&r2=1.15
> but also below
[patch to properties.dtml]

To repeat: patching properties.dtml will never be able to solve the
backwards compatibility breakage involving management_page_charset not
being treated as a callable (if possible) anymore.

It sounds therefore that Hajime and I are talking about two different
things.

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] 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.14&r2=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.
  
+ 
  
  
  


___
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 Martijn Faassen
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?

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] 2.7 management_page_charset cannot be callable anymore

2004-01-15 Thread Martijn Faassen
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.

I'm having trouble understanding what you forward-ported and what you'd
like me to test. As far as I can determine management_page_header.dtml
is still unchanged in CVS.

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] 2.7 management_page_charset cannot be callable anymore

2004-01-14 Thread Brian Lloyd
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.



Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716  
Zope Corporation   http://www.zope.com 


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Hajime Nakagami
> Sent: Wednesday, January 14, 2004 1:29 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Zope-dev] 2.7 management_page_charset cannot be callable
> anymore
> 
> 
> +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:
> >
> >
> >
> >
> > content="text/html;charset=&dtml-management_page_charset;">
> > "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 )
> 

___
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:
>
>
>
>
>content="text/html;charset=&dtml-management_page_charset;">
>"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 )