[Zope] language environment changes after a while

Andreas Jung Andreas Jung <lists@andreas-jung.com>
Sun, 27 Oct 2002 20:02:52 +0100


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"               -
    ---------------------------------------------------------------------