Update COPYING with new address of the FSF.
[squirrelmail.git] / functions / i18n.php
index a81a192f2be2a4949529e470d9c716e1ff057ebc..554ab4427c189a458c62a67b43618ae68b733f5c 100644 (file)
@@ -322,6 +322,10 @@ function set_up_language($sm_language, $do_search = false, $default = false) {
         $squirrelmail_language = $squirrelmail_default_language;
         $sm_language = $squirrelmail_default_language;
     }
+
+    /** provide failsafe language when detection fails */
+    if (! $sm_language) $sm_language='en_US';
+
     $sm_notAlias = $sm_language;
 
     // Catching removed translation
@@ -456,7 +460,7 @@ function set_up_language($sm_language, $do_search = false, $default = false) {
             function_exists('mb_internal_encoding') &&
             check_php_version(4,2,0) &&
             (int)ini_get('mbstring.func_overload')!=0) {
-            mb_internal_encoding('ASCII');
+            mb_internal_encoding('pass');
         }
     }
     return 0;