use C floating point
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 4 Oct 2004 16:35:31 +0000 (16:35 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 4 Oct 2004 16:35:31 +0000 (16:35 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8148 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/i18n.php

index bd6f6323e6fdc2823627d8220a8a1f52c197f08a..e89d3fff0d7f69603f12a18e33726e5149d24c75 100644 (file)
@@ -292,9 +292,16 @@ function set_up_language($sm_language, $do_search = false, $default = false) {
             putenv( "LC_ALL=$longlocale" );
             putenv( "LANG=$longlocale" );
             putenv( "LANGUAGE=$longlocale" );
+            putenv( "LC_NUMERIC=C" );
             if ($sm_notAlias=='tr_TR') putenv( "LC_CTYPE=C" );
         }
         setlocale(LC_ALL, $longlocale);
+        // Workaround for plugins that use numbers with floating point
+        // It might be removed if plugins use correct decimal delimiters 
+       // according to locale settings.
+        setlocale(LC_NUMERIC, 'C');
+        // Workaround for specific Turkish strtolower/strtoupper rules.
+        // Many functions expect English conversion rules.
         if ($sm_notAlias=='tr_TR') setlocale(LC_CTYPE,'C');
 
         // Set text direction/alignment variables