X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=functions%2Fdecode%2Fiso_8859_11.php;h=9f9abf97bcbb9f2d49abbc7d111acf6d8a11f441;hb=d4e46166df04792c6b939356ea5dfda8e47bba7b;hp=0629e1fe04890846474dd1fee34a43f4e32e957f;hpb=e53c9681b4646b7ca1b0071434d360be56a80a6e;p=squirrelmail.git diff --git a/functions/decode/iso_8859_11.php b/functions/decode/iso_8859_11.php index 0629e1fe..9f9abf97 100644 --- a/functions/decode/iso_8859_11.php +++ b/functions/decode/iso_8859_11.php @@ -1,40 +1,40 @@ + * Name: ISO/IEC 8859-11:2001 to Unicode + * Unicode version: 3.2 + * Table version: 1.0 + * Table format: Format A + * Date: 2002 October 7 + * Authors: Ken Whistler * * Original copyright: - * Copyright (c) 1999 Unicode, Inc. All Rights reserved. + * Copyright (c) 1999 Unicode, Inc. All Rights reserved. * - * This file is provided as-is by Unicode, Inc. (The Unicode Consortium). - * No claims are made as to fitness for any particular purpose. No - * warranties of any kind are expressed or implied. The recipient - * agrees to determine applicability of information provided. If this - * file has been provided on optical media by Unicode, Inc., the sole - * remedy for any claim will be exchange of defective media within 90 - * days of receipt. + * This file is provided as-is by Unicode, Inc. (The Unicode Consortium). + * No claims are made as to fitness for any particular purpose. No + * warranties of any kind are expressed or implied. The recipient + * agrees to determine applicability of information provided. If this + * file has been provided on optical media by Unicode, Inc., the sole + * remedy for any claim will be exchange of defective media within 90 + * days of receipt. * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form for - * internal or external distribution as long as this notice remains - * attached. + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form for + * internal or external distribution as long as this notice remains + * attached. * + * @copyright © 2003-2009 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail * @subpackage decode @@ -43,112 +43,105 @@ /** * Decode iso8859-11 string * @param string $string Encoded string - * @return string $string Decoded string + * @return string $string Decoded string */ function charset_decode_iso_8859_11 ($string) { - global $default_charset; - - if (strtolower($default_charset) == 'iso-8859-11') - return $string; - // don't do decoding when there are no 8bit symbols if (! sq_is8bit($string,'iso-8859-11')) return $string; $iso8859_11 = array( - "\xA0" => ' ', - "\xA1" => 'ก', - "\xA2" => 'ข', - "\xA3" => 'ฃ', - "\xA4" => 'ค', - "\xA5" => 'ฅ', - "\xA6" => 'ฆ', - "\xA7" => 'ง', - "\xA8" => 'จ', - "\xA9" => 'ฉ', - "\xAA" => 'ช', - "\xAB" => 'ซ', - "\xAC" => 'ฌ', - "\xAD" => 'ญ', - "\xAE" => 'ฎ', - "\xAF" => 'ฏ', - "\xB0" => 'ฐ', - "\xB1" => 'ฑ', - "\xB2" => 'ฒ', - "\xB3" => 'ณ', - "\xB4" => 'ด', - "\xB5" => 'ต', - "\xB6" => 'ถ', - "\xB7" => 'ท', - "\xB8" => 'ธ', - "\xB9" => 'น', - "\xBA" => 'บ', - "\xBB" => 'ป', - "\xBC" => 'ผ', - "\xBD" => 'ฝ', - "\xBE" => 'พ', - "\xBF" => 'ฟ', - "\xC0" => 'ภ', - "\xC1" => 'ม', - "\xC2" => 'ย', - "\xC3" => 'ร', - "\xC4" => 'ฤ', - "\xC5" => 'ล', - "\xC6" => 'ฦ', - "\xC7" => 'ว', - "\xC8" => 'ศ', - "\xC9" => 'ษ', - "\xCA" => 'ส', - "\xCB" => 'ห', - "\xCC" => 'ฬ', - "\xCD" => 'อ', - "\xCE" => 'ฮ', - "\xCF" => 'ฯ', - "\xD0" => 'ะ', - "\xD1" => 'ั', - "\xD2" => 'า', - "\xD3" => 'ำ', - "\xD4" => 'ิ', - "\xD5" => 'ี', - "\xD6" => 'ึ', - "\xD7" => 'ื', - "\xD8" => 'ุ', - "\xD9" => 'ู', - "\xDA" => 'ฺ', - "\xDF" => '฿', - "\xE0" => 'เ', - "\xE1" => 'แ', - "\xE2" => 'โ', - "\xE3" => 'ใ', - "\xE4" => 'ไ', - "\xE5" => 'ๅ', - "\xE6" => 'ๆ', - "\xE7" => '็', - "\xE8" => '่', - "\xE9" => '้', - "\xEA" => '๊', - "\xEB" => '๋', - "\xEC" => '์', - "\xED" => 'ํ', - "\xEE" => '๎', - "\xEF" => '๏', - "\xF0" => '๐', - "\xF1" => '๑', - "\xF2" => '๒', - "\xF3" => '๓', - "\xF4" => '๔', - "\xF5" => '๕', - "\xF6" => '๖', - "\xF7" => '๗', - "\xF8" => '๘', - "\xF9" => '๙', - "\xFA" => '๚', - "\xFB" => '๛' + "\xA0" => ' ', + "\xA1" => 'ก', + "\xA2" => 'ข', + "\xA3" => 'ฃ', + "\xA4" => 'ค', + "\xA5" => 'ฅ', + "\xA6" => 'ฆ', + "\xA7" => 'ง', + "\xA8" => 'จ', + "\xA9" => 'ฉ', + "\xAA" => 'ช', + "\xAB" => 'ซ', + "\xAC" => 'ฌ', + "\xAD" => 'ญ', + "\xAE" => 'ฎ', + "\xAF" => 'ฏ', + "\xB0" => 'ฐ', + "\xB1" => 'ฑ', + "\xB2" => 'ฒ', + "\xB3" => 'ณ', + "\xB4" => 'ด', + "\xB5" => 'ต', + "\xB6" => 'ถ', + "\xB7" => 'ท', + "\xB8" => 'ธ', + "\xB9" => 'น', + "\xBA" => 'บ', + "\xBB" => 'ป', + "\xBC" => 'ผ', + "\xBD" => 'ฝ', + "\xBE" => 'พ', + "\xBF" => 'ฟ', + "\xC0" => 'ภ', + "\xC1" => 'ม', + "\xC2" => 'ย', + "\xC3" => 'ร', + "\xC4" => 'ฤ', + "\xC5" => 'ล', + "\xC6" => 'ฦ', + "\xC7" => 'ว', + "\xC8" => 'ศ', + "\xC9" => 'ษ', + "\xCA" => 'ส', + "\xCB" => 'ห', + "\xCC" => 'ฬ', + "\xCD" => 'อ', + "\xCE" => 'ฮ', + "\xCF" => 'ฯ', + "\xD0" => 'ะ', + "\xD1" => 'ั', + "\xD2" => 'า', + "\xD3" => 'ำ', + "\xD4" => 'ิ', + "\xD5" => 'ี', + "\xD6" => 'ึ', + "\xD7" => 'ื', + "\xD8" => 'ุ', + "\xD9" => 'ู', + "\xDA" => 'ฺ', + "\xDF" => '฿', + "\xE0" => 'เ', + "\xE1" => 'แ', + "\xE2" => 'โ', + "\xE3" => 'ใ', + "\xE4" => 'ไ', + "\xE5" => 'ๅ', + "\xE6" => 'ๆ', + "\xE7" => '็', + "\xE8" => '่', + "\xE9" => '้', + "\xEA" => '๊', + "\xEB" => '๋', + "\xEC" => '์', + "\xED" => 'ํ', + "\xEE" => '๎', + "\xEF" => '๏', + "\xF0" => '๐', + "\xF1" => '๑', + "\xF2" => '๒', + "\xF3" => '๓', + "\xF4" => '๔', + "\xF5" => '๕', + "\xF6" => '๖', + "\xF7" => '๗', + "\xF8" => '๘', + "\xF9" => '๙', + "\xFA" => '๚', + "\xFB" => '๛' ); $string = str_replace(array_keys($iso8859_11), array_values($iso8859_11), $string); return $string; } - -?>