Add phpdoc doc blocks to some files.
[squirrelmail.git] / functions / i18n.php
index 10fe4e8e689d4792ceeb5710272379c3b10eea56..3d99ed0690253bba2e694310d8c7161a30a71720 100644 (file)
  * encoded using Unicode entities according to HTML 4.0.
  *
  * $Id$
+ * @package squirrelmail
  */
 
+/** Everything uses global.php... */
 require_once(SM_PATH . 'functions/global.php');
 
-/* Decodes a string to the internal encoding from the given charset */
+/**
+ * Decodes a string to the internal encoding from the given charset
+ * 
+ * @param string $charset
+ * @param string $string Text to be decoded
+ * @return string Decoded text
+ */
 function charset_decode ($charset, $string) {
     global $languages, $squirrelmail_language, $default_charset;
     global $use_php_recode, $use_php_iconv, $agresive_decoding;
@@ -203,7 +211,7 @@ function charset_decode ($charset, $string) {
     } else if ($charset == 'gb2312' and $agresive_decoding ) {
         include_once(SM_PATH . 'functions/decode/gb2312.php');
         $ret = charset_decode_gb2312 ($string);
-    } else if ($charset == 'utf-8') {
+    } else if ($charset == 'utf-8' && $squirrelmail_language != 'ja_JP') {
         include_once(SM_PATH . 'functions/decode/utf-8.php');
        $ret = charset_decode_utf8 ($string);
     } else {