language environment changes after a while
Hi, I have detected a problem I can't find rational: I integrated PublisherProfile product from cvs.zope.org and after zope starts it writes the time values with formating value %.3f as dotted values of 0.789 . After a while the format changes to comma values 0,789 . Where should I search for a bug ? I don't thing that it is a problem of PublisherProfile product. Regards, Dirk
Dirk Datzert writes:
I have detected a problem I can't find rational:
I integrated PublisherProfile product from cvs.zope.org and after zope starts it writes the time values with formating value %.3f as dotted values of 0.789 . After a while the format changes to comma values 0,789 .
Where should I search for a bug ? I don't thing that it is a problem of PublisherProfile product. Either one of your Python modules or one of the external C implementations sets the locale. This is a very bad idea, as the locale setting is global...
Dieter
Hi Dieter, I grepped for 'grep -ri locale *' and found: happydoc/HappyDoc-r2_0_1/build/lib/happydoclib/docstring/StructuredText/ClassicS tructuredText.py: import locale happydoc/HappyDoc-r2_0_1/build/lib/happydoclib/docstring/StructuredText/ClassicS tructuredText.py: locale.setlocale(locale.LC_ALL,"") happydoc/HappyDoc-r2_0_1/happydoclib/docstring/StructuredText/ClassicStructuredT ext.py: import locale happydoc/HappyDoc-r2_0_1/happydoclib/docstring/StructuredText/ClassicStructuredT ext.py: locale.setlocale(locale.LC_ALL,"") Can one of those be a problem ? Normally I start z2.py with argument -L 'german' . Is this maybe wrong ? Regards, Dirk Dieter Maurer schrieb:
Dirk Datzert writes:
I have detected a problem I can't find rational:
I integrated PublisherProfile product from cvs.zope.org and after zope starts it writes the time values with formating value %.3f as dotted values of 0.789 . After a while the format changes to comma values 0,789 .
Where should I search for a bug ? I don't thing that it is a problem of PublisherProfile product. Either one of your Python modules or one of the external C implementations sets the locale. This is a very bad idea, as the locale setting is global...
Dieter
see http://www.zope.org/Members/ajung/howto/Locale%20Support%20for%20Structured %20Text/ --On Sonntag, 27. Oktober 2002 19:45 +0100 Dirk Datzert <dirk.datzert@tks-rasselstein.thyssenkrupp.com> wrote:
Hi Dieter,
I grepped for 'grep -ri locale *' and found:
happydoc/HappyDoc-r2_0_1/build/lib/happydoclib/docstring/StructuredText/C lassicS tructuredText.py: import locale happydoc/HappyDoc-r2_0_1/build/lib/happydoclib/docstring/StructuredText/C lassicS tructuredText.py: locale.setlocale(locale.LC_ALL,"") happydoc/HappyDoc-r2_0_1/happydoclib/docstring/StructuredText/ClassicStru cturedT ext.py: import locale happydoc/HappyDoc-r2_0_1/happydoclib/docstring/StructuredText/ClassicStru cturedT ext.py: locale.setlocale(locale.LC_ALL,"")
Can one of those be a problem ? Normally I start z2.py with argument -L 'german' . Is this maybe wrong ?
Regards, Dirk
Dieter Maurer schrieb:
Dirk Datzert writes:
I have detected a problem I can't find rational:
I integrated PublisherProfile product from cvs.zope.org and after zope starts it writes the time values with formating value %.3f as dotted values of 0.789 . After a while the format changes to comma values 0,789 .
Where should I search for a bug ? I don't thing that it is a problem of PublisherProfile product. Either one of your Python modules or one of the external C implementations sets the locale. This is a very bad idea, as the locale setting is global...
Dieter
_______________________________________________ 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 )
--------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
Dirk Datzert writes:
I grepped for 'grep -ri locale *' and found: ... tructuredText.py: locale.setlocale(locale.LC_ALL,"") happydoc/HappyDoc-r2_0_1/happydoclib/docstring/StructuredText/ClassicStructuredT ... Can one of those be a problem ? Do you use "HappyDoc" from inside your Zope?
Then this can be a problem: "setlocale(...,'')" sets the default locale, which may be different from that you start Zope with. There is an environment variable (I think, it is "LC_ALL"; but check the documentation) to set the default "locale". Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
Dirk Datzert