can not use -L in zope startup
Hi, I would like to use Unicode support in Zope (to use non ASCII characters in structured text) However when I try to start zope with the -l command line switch I get an error. The specified locale is not supported by your system. See your operating system documentation for more information on locale support. I tried to set the environment variable LC_ALL to different values. Always to the same effect. This is on both win2000 and Linux. What can I do ? thanks Robert
Suppose we have a DTML Method named "A" --------------------------------------------------------- <dtml-unless "REQUEST.has_key('aa')"> <dtml-call "REQUEST.set('aa',0)"> </dtml-unless> <dtml-call "REQUEST.set('aa',REQUEST['aa']+1)"> <dtml-var "REQUEST['aa']"> <dtml-if "REQUEST['aa']>10"> <dtml-return "''"><dtml-comment>Stop here</dtml-comment> <dtml-else> <dtml-var A><dtml-comment>Go deeper</dtml-comment> </dtml-if> --------------------------------------------------------- Excute it, then got the result: Error Type: KeyError Error Value: validate --------------------------------------------------------- This is a sample method abstracted from my another more complex method which works in the previous version of Zope. I know that there are something changed in the SecurityManager. But I have no idea how to make this sort of recursive method works again. Any suggestion? Thanks. Iap, Singuan
Well, I answer myself: change the lib/python/OFS/DTMLMethod.py in line 203: from del self.__dict__['validate'] to if self.__dict__.has_key('validate'): del self.__dict__['validate'] Then, it works again. But maybe this is just a skin-deep solution. I have no idea if this will cause another problem, such as security hole? ----- Original Message ----- From: <iap@y2fun.com> To: <zope@zope.org> Sent: Tuesday, October 30, 2001 4:33 PM Subject: [Zope] Recursive Calling the same DTML Method is not validated?
Suppose we have a DTML Method named "A" --------------------------------------------------------- <dtml-unless "REQUEST.has_key('aa')"> <dtml-call "REQUEST.set('aa',0)"> </dtml-unless>
<dtml-call "REQUEST.set('aa',REQUEST['aa']+1)"> <dtml-var "REQUEST['aa']">
<dtml-if "REQUEST['aa']>10"> <dtml-return "''"><dtml-comment>Stop here</dtml-comment> <dtml-else> <dtml-var A><dtml-comment>Go deeper</dtml-comment> </dtml-if> --------------------------------------------------------- Excute it, then got the result:
Error Type: KeyError Error Value: validate --------------------------------------------------------- This is a sample method abstracted from my another more complex method which works in the previous version of Zope. I know that there are something changed in the SecurityManager. But I have no idea how to make this sort of recursive method works again. Any suggestion? Thanks. Iap, Singuan
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
iap@y2fun.com wrote:
Well, I answer myself: change the lib/python/OFS/DTMLMethod.py in line 203: from del self.__dict__['validate'] to if self.__dict__.has_key('validate'): del self.__dict__['validate'] Then, it works again. But maybe this is just a skin-deep solution. I have no idea if this will cause another problem, such as security hole?
Steve Alexander noticed the same thing and I think moves are afoot to correct it the 'right' way, whatever that may be... cheers, Chris
What values did you use for LC_ALL ? Andreas ----- Original Message ----- From: "Robert Rottermann" <robert@redcor.ch> To: <zope@zope.org> Sent: Tuesday, October 30, 2001 01:14 Subject: [Zope] can not use -L in zope startup
Hi, I would like to use Unicode support in Zope (to use non ASCII characters in structured text) However when I try to start zope with the -l command line switch I get an error.
The specified locale is not supported by your system. See your operating system documentation for more information on locale support.
I tried to set the environment variable LC_ALL to different values. Always to the same effect.
This is on both win2000 and Linux.
What can I do ?
thanks Robert
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
----- Original Message ----- From: "Robert Rottermann" <robert@redcor.ch> To: <zope@zope.org> Sent: Tuesday, October 30, 2001 01:14 Subject: [Zope] can not use -L in zope startup
Hi, I would like to use Unicode support in Zope (to use non ASCII characters in structured text)
The -L option enables the locale support for Zope. But this is different what you call unicode support. Unicode support is not related to locale support. Andreas
Andreas Jung wrote:
----- Original Message ----- From: "Robert Rottermann" <robert@redcor.ch> To: <zope@zope.org> Sent: Tuesday, October 30, 2001 01:14 Subject: [Zope] can not use -L in zope startup
Hi, I would like to use Unicode support in Zope (to use non ASCII characters in structured text)
The -L option enables the locale support for Zope. But this is different what you call unicode support. Unicode support is not related to locale support.
just a quote: -L option doesn't work in my linux box... so, set LC_ALL environment variable... bye andré
Robert Rottermann writes:
I would like to use Unicode support in Zope (to use non ASCII characters in structured text) However when I try to start zope with the -l command line switch I get an error. Are you sure, you use the "-L" option correctly?
I can use it without problem (an older ZopeCVS version, shortly after version 2.4.1 was released, on Linux2). "-L" wants an argument, e.g. "-L de_DE" or "-L ''"! Furthermore, the "-L" must come before the first non-option, e.g. before the "STUPID_LOG_FILE=logfile". Dieter
participants (6)
-
Andreas Jung -
André Camargo -
Chris Withers -
Dieter Maurer -
iap@y2fun.com -
Robert Rottermann