<?php
-/*
+/**
* decode/gb2312.php
* $Id$
*
- * Copyright (c) 2003 The SquirrelMail Project Team
+ * Copyright (c) 2003-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This file contains gb2312-euk decoding function that is needed to read
* Unicode Standard, and to make copies of this file in any form for
* internal or external distribution as long as this notice remains
* attached.
- *
+ * @package squirrelmail
+ * @subpackage decode
+ */
+
+
+/**
+ * Decode gb2312-euk encoded string
+ * @param string $string Encoded string
+ * @return string $string Decoded string
*/
function charset_decode_gb2312 ($string) {
- global $default_charset;
+ global $default_charset,$agresive_decoding;
- if (strtolower($default_charset) == 'gb2312')
- return $string;
+ if (!$agresive_decoding) return $string;
/* Only do the slow convert if there are 8-bit characters */
if ( ! ereg("[\241-\377]", $string) )
return $string;
}
-?>
\ No newline at end of file
+?>