+++ /dev/null
-<?php
-/**
- * decode/cp10000.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10000 (MacRoman) decoding function that
- * is needed to read cp10000 encoded mails in non-cp10000 locale.
- *
- * Original data taken from:
- * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/ROMAN.TXT
- *
- * Name: cp10000_MacRoman to Unicode table
- * Unicode version: 2.0
- * Table version: 2.00
- * Table format: Format A
- * Date: 04/24/96
- * Authors: Lori Brownell <loribr@microsoft.com>
- * K.D. Chang <a-kchang@microsoft.com>
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode cp10000 (MacRoman) string
- * @param string $string String to decode
- * @return string $string Decoded string
- */
-function charset_decode_cp10000 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-roman')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10000 = array(
- "\0x80" => 'Ä',
- "\0x81" => 'Å',
- "\0x82" => 'Ç',
- "\0x83" => 'É',
- "\0x84" => 'Ñ',
- "\0x85" => 'Ö',
- "\0x86" => 'Ü',
- "\0x87" => 'á',
- "\0x88" => 'à',
- "\0x89" => 'â',
- "\0x8A" => 'ä',
- "\0x8B" => 'ã',
- "\0x8C" => 'å',
- "\0x8D" => 'ç',
- "\0x8E" => 'é',
- "\0x8F" => 'è',
- "\0x90" => 'ê',
- "\0x91" => 'ë',
- "\0x92" => 'í',
- "\0x93" => 'ì',
- "\0x94" => 'î',
- "\0x95" => 'ï',
- "\0x96" => 'ñ',
- "\0x97" => 'ó',
- "\0x98" => 'ò',
- "\0x99" => 'ô',
- "\0x9A" => 'ö',
- "\0x9B" => 'õ',
- "\0x9C" => 'ú',
- "\0x9D" => 'ù',
- "\0x9E" => 'û',
- "\0x9F" => 'ü',
- "\0xA0" => '†',
- "\0xA1" => '°',
- "\0xA2" => '¢',
- "\0xA3" => '£',
- "\0xA4" => '§',
- "\0xA5" => '•',
- "\0xA6" => '¶',
- "\0xA7" => 'ß',
- "\0xA8" => '®',
- "\0xA9" => '©',
- "\0xAA" => '™',
- "\0xAB" => '´',
- "\0xAC" => '¨',
- "\0xAD" => '≠',
- "\0xAE" => 'Æ',
- "\0xAF" => 'Ø',
- "\0xB0" => '∞',
- "\0xB1" => '±',
- "\0xB2" => '≤',
- "\0xB3" => '≥',
- "\0xB4" => '¥',
- "\0xB5" => 'µ',
- "\0xB6" => '∂',
- "\0xB7" => '∑',
- "\0xB8" => '∏',
- "\0xB9" => 'π',
- "\0xBA" => '∫',
- "\0xBB" => 'ª',
- "\0xBC" => 'º',
- "\0xBD" => 'Ω',
- "\0xBE" => 'æ',
- "\0xBF" => 'ø',
- "\0xC0" => '¿',
- "\0xC1" => '¡',
- "\0xC2" => '¬',
- "\0xC3" => '√',
- "\0xC4" => 'ƒ',
- "\0xC5" => '≈',
- "\0xC6" => '∆',
- "\0xC7" => '«',
- "\0xC8" => '»',
- "\0xC9" => '…',
- "\0xCA" => ' ',
- "\0xCB" => 'À',
- "\0xCC" => 'Ã',
- "\0xCD" => 'Õ',
- "\0xCE" => 'Œ',
- "\0xCF" => 'œ',
- "\0xD0" => '–',
- "\0xD1" => '—',
- "\0xD2" => '“',
- "\0xD3" => '”',
- "\0xD4" => '‘',
- "\0xD5" => '’',
- "\0xD6" => '÷',
- "\0xD7" => '◊',
- "\0xD8" => 'ÿ',
- "\0xD9" => 'Ÿ',
- "\0xDA" => '⁄',
- "\0xDB" => '¤',
- "\0xDC" => '‹',
- "\0xDD" => '›',
- "\0xDE" => 'fi',
- "\0xDF" => 'fl',
- "\0xE0" => '‡',
- "\0xE1" => '·',
- "\0xE2" => '‚',
- "\0xE3" => '„',
- "\0xE4" => '‰',
- "\0xE5" => 'Â',
- "\0xE6" => 'Ê',
- "\0xE7" => 'Á',
- "\0xE8" => 'Ë',
- "\0xE9" => 'È',
- "\0xEA" => 'Í',
- "\0xEB" => 'Î',
- "\0xEC" => 'Ï',
- "\0xED" => 'Ì',
- "\0xEE" => 'Ó',
- "\0xEF" => 'Ô',
- "\0xF0" => '',
- "\0xF1" => 'Ò',
- "\0xF2" => 'Ú',
- "\0xF3" => 'Û',
- "\0xF4" => 'Ù',
- "\0xF5" => 'ı',
- "\0xF6" => 'ˆ',
- "\0xF7" => '˜',
- "\0xF8" => '¯',
- "\0xF9" => '˘',
- "\0xFA" => '˙',
- "\0xFB" => '˚',
- "\0xFC" => '¸',
- "\0xFD" => '˝',
- "\0xFE" => '˛',
- "\0xFF" => 'ˇ'
- );
-
- $string = str_replace(array_keys($cp10000), array_values($cp10000), $string);
-
- return $string;
-}
-?>
+++ /dev/null
-<?php
-/**
- * decode/cp10006.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10006 (MacGreek) decoding function that
- * is needed to read cp10006 encoded mails in non-cp10006 locale.
- *
- * Original data taken from:
- * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/GREEK.TXT
- *
- * Name: cp10006_MacGreek to Unicode table
- * Unicode version: 2.0
- * Table version: 2.00
- * Table format: Format A
- * Date: 04/24/96
- * Authors: Lori Brownell <loribr@microsoft.com>
- * K.D. Chang <a-kchang@microsoft.com>
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode cp10006 (MacGreek) string
- * @param string $string String to decode
- * @return string $string Decoded string
- */
-function charset_decode_cp10006 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-greek')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10006 = array(
- "\0x80" => 'Ä',
- "\0x81" => '¹',
- "\0x82" => '²',
- "\0x83" => 'É',
- "\0x84" => '³',
- "\0x85" => 'Ö',
- "\0x86" => 'Ü',
- "\0x87" => '΅',
- "\0x88" => 'à',
- "\0x89" => 'â',
- "\0x8A" => 'ä',
- "\0x8B" => '΄',
- "\0x8C" => '¨',
- "\0x8D" => 'ç',
- "\0x8E" => 'é',
- "\0x8F" => 'è',
- "\0x90" => 'ê',
- "\0x91" => 'ë',
- "\0x92" => '£',
- "\0x93" => '™',
- "\0x94" => 'î',
- "\0x95" => 'ï',
- "\0x96" => '•',
- "\0x97" => '½',
- "\0x98" => '‰',
- "\0x99" => 'ô',
- "\0x9A" => 'ö',
- "\0x9B" => '¦',
- "\0x9C" => '­',
- "\0x9D" => 'ù',
- "\0x9E" => 'û',
- "\0x9F" => 'ü',
- "\0xA0" => '†',
- "\0xA1" => 'Γ',
- "\0xA2" => 'Δ',
- "\0xA3" => 'Θ',
- "\0xA4" => 'Λ',
- "\0xA5" => 'Ξ',
- "\0xA6" => 'Π',
- "\0xA7" => 'ß',
- "\0xA8" => '®',
- "\0xA9" => '©',
- "\0xAA" => 'Σ',
- "\0xAB" => 'Ϊ',
- "\0xAC" => '§',
- "\0xAD" => '≠',
- "\0xAE" => '°',
- "\0xAF" => '·',
- "\0xB0" => 'Α',
- "\0xB1" => '±',
- "\0xB2" => '≤',
- "\0xB3" => '≥',
- "\0xB4" => '¥',
- "\0xB5" => 'Β',
- "\0xB6" => 'Ε',
- "\0xB7" => 'Ζ',
- "\0xB8" => 'Η',
- "\0xB9" => 'Ι',
- "\0xBA" => 'Κ',
- "\0xBB" => 'Μ',
- "\0xBC" => 'Φ',
- "\0xBD" => 'Ϋ',
- "\0xBE" => 'Ψ',
- "\0xBF" => 'Ω',
- "\0xC0" => 'ά',
- "\0xC1" => 'Ν',
- "\0xC2" => '¬',
- "\0xC3" => 'Ο',
- "\0xC4" => 'Ρ',
- "\0xC5" => '≈',
- "\0xC6" => 'Τ',
- "\0xC7" => '«',
- "\0xC8" => '»',
- "\0xC9" => '…',
- "\0xCA" => ' ',
- "\0xCB" => 'Υ',
- "\0xCC" => 'Χ',
- "\0xCD" => 'Ά',
- "\0xCE" => 'Έ',
- "\0xCF" => 'œ',
- "\0xD0" => '–',
- "\0xD1" => '―',
- "\0xD2" => '“',
- "\0xD3" => '”',
- "\0xD4" => '‘',
- "\0xD5" => '’',
- "\0xD6" => '÷',
- "\0xD7" => 'Ή',
- "\0xD8" => 'Ί',
- "\0xD9" => 'Ό',
- "\0xDA" => 'Ύ',
- "\0xDB" => 'έ',
- "\0xDC" => 'ή',
- "\0xDD" => 'ί',
- "\0xDE" => 'ό',
- "\0xDF" => 'Ώ',
- "\0xE0" => 'ύ',
- "\0xE1" => 'α',
- "\0xE2" => 'β',
- "\0xE3" => 'ψ',
- "\0xE4" => 'δ',
- "\0xE5" => 'ε',
- "\0xE6" => 'φ',
- "\0xE7" => 'γ',
- "\0xE8" => 'η',
- "\0xE9" => 'ι',
- "\0xEA" => 'ξ',
- "\0xEB" => 'κ',
- "\0xEC" => 'λ',
- "\0xED" => 'μ',
- "\0xEE" => 'ν',
- "\0xEF" => 'ο',
- "\0xF0" => 'π',
- "\0xF1" => 'ώ',
- "\0xF2" => 'ρ',
- "\0xF3" => 'σ',
- "\0xF4" => 'τ',
- "\0xF5" => 'θ',
- "\0xF6" => 'ω',
- "\0xF7" => 'ς',
- "\0xF8" => 'χ',
- "\0xF9" => 'υ',
- "\0xFA" => 'ζ',
- "\0xFB" => 'ϊ',
- "\0xFC" => 'ϋ',
- "\0xFD" => 'ΐ',
- "\0xFE" => 'ΰ',
- "\0xFF" => ''
- );
-
- $string = str_replace(array_keys($cp10006), array_values($cp10006), $string);
-
- return $string;
-}
-?>
+++ /dev/null
-<?php
-/**
- * decode/cp10007.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10007 (MacCyrillic) decoding function that
- * is needed to read cp10007 encoded mails in non-cp10007 locale.
- *
- * Original data taken from:
- * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/CYRILLIC.TXT
- *
- * Name: cp10007_MacCyrillic to Unicode table
- * Unicode version: 2.0
- * Table version: 2.00
- * Table format: Format A
- * Date: 04/24/96
- * Authors: Lori Brownell <loribr@microsoft.com>
- * K.D. Chang <a-kchang@microsoft.com>
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode cp10007 (MacCyrillic) string
- * @param string $string MacCyrillic string to decode
- * @return string $string Decoded string
- */
-function charset_decode_cp10007 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-cyrillic')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10007 = array(
- "\x80" => 'А',
- "\x81" => 'Б',
- "\x82" => 'В',
- "\x83" => 'Г',
- "\x84" => 'Д',
- "\x85" => 'Е',
- "\x86" => 'Ж',
- "\x87" => 'З',
- "\x88" => 'И',
- "\x89" => 'Й',
- "\x8A" => 'К',
- "\x8B" => 'Л',
- "\x8C" => 'М',
- "\x8D" => 'Н',
- "\x8E" => 'О',
- "\x8F" => 'П',
- "\x90" => 'Р',
- "\x91" => 'С',
- "\x92" => 'Т',
- "\x93" => 'У',
- "\x94" => 'Ф',
- "\x95" => 'Х',
- "\x96" => 'Ц',
- "\x97" => 'Ч',
- "\x98" => 'Ш',
- "\x99" => 'Щ',
- "\x9A" => 'Ъ',
- "\x9B" => 'Ы',
- "\x9C" => 'Ь',
- "\x9D" => 'Э',
- "\x9E" => 'Ю',
- "\x9F" => 'Я',
- "\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" => 'Џ',
- "\xDB" => 'џ',
- "\xDC" => '№',
- "\xDD" => 'Ё',
- "\xDE" => 'ё',
- "\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" => 'ы',
- "\xFC" => 'ь',
- "\xFD" => 'э',
- "\xFE" => 'ю',
- "\xFF" => '¤'
- );
-
- $string = str_replace(array_keys($cp10007), array_values($cp10007), $string);
-
- return $string;
-}
-?>
+++ /dev/null
-<?php
-/**
- * decode/cp10017.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10017 (MacUkrainian) decoding function that
- * is needed to read cp10017 encoded mails in non-cp10017 locale.
- *
- * Apple states [2] that x-mac-ukrainian differs from x-mac-cyrillic [1]
- * only in two places. According to [3] these symbols are:
- * 0x92 - U+1168 - CYRILLIC CAPITAL LETTER GHE WITH UPTURN
- * 0xD6 - U+1169 - CYRILLIC SMALL LETTER GHE WITH UPTURN
- *
- * References:
- * 1. ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/CYRILLIC.TXT
- * 2. http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html
- * 3. http://shlimazl.nm.ru/rus/cptable.htm (page in Russian)
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode a cp10017 (MacUkrainian) string
- * @param string $string Encoded string
- * @return string $string Decoded string
- */
-function charset_decode_cp10017 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-ukrainian')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10017 = array(
- "\x80" => 'А',
- "\x81" => 'Б',
- "\x82" => 'В',
- "\x83" => 'Г',
- "\x84" => 'Д',
- "\x85" => 'Е',
- "\x86" => 'Ж',
- "\x87" => 'З',
- "\x88" => 'И',
- "\x89" => 'Й',
- "\x8A" => 'К',
- "\x8B" => 'Л',
- "\x8C" => 'М',
- "\x8D" => 'Н',
- "\x8E" => 'О',
- "\x8F" => 'П',
- "\x90" => 'Р',
- "\x91" => 'С',
- "\x92" => 'Ґ',
- "\x93" => 'У',
- "\x94" => 'Ф',
- "\x95" => 'Х',
- "\x96" => 'Ц',
- "\x97" => 'Ч',
- "\x98" => 'Ш',
- "\x99" => 'Щ',
- "\x9A" => 'Ъ',
- "\x9B" => 'Ы',
- "\x9C" => 'Ь',
- "\x9D" => 'Э',
- "\x9E" => 'Ю',
- "\x9F" => 'Я',
- "\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" => 'Џ',
- "\xDB" => 'џ',
- "\xDC" => '№',
- "\xDD" => 'Ё',
- "\xDE" => 'ё',
- "\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" => 'ы',
- "\xFC" => 'ь',
- "\xFD" => 'э',
- "\xFE" => 'ю',
- "\xFF" => '¤'
- );
-
- $string = str_replace(array_keys($cp10017), array_values($cp10017), $string);
-
- return $string;
-}
-?>
+++ /dev/null
-<?php
-/**
- * decode/cp10029.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10029 (MacLatin2) decoding function that
- * is needed to read cp10029 encoded mails in non-cp10029 locale.
- *
- * Original data taken from:
- * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/LATIN2.TXT
- *
- * Name: cp10029_MacLatin2 to Unicode table
- * Unicode version: 2.0
- * Table version: 2.00
- * Table format: Format A
- * Date: 04/24/96
- * Authors: Lori Brownell <loribr@microsoft.com>
- * K.D. Chang <a-kchang@microsoft.com>
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode cp10029 (MacLatin2) string
- * @param string $string Encoded string
- * @return string $string Decoded string
- */
-function charset_decode_cp10029 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-centraleurroman')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10029 = array(
- "\0x80" => 'Ä',
- "\0x81" => 'Ā',
- "\0x82" => 'ā',
- "\0x83" => 'É',
- "\0x84" => 'Ą',
- "\0x85" => 'Ö',
- "\0x86" => 'Ü',
- "\0x87" => 'á',
- "\0x88" => 'ą',
- "\0x89" => 'Č',
- "\0x8A" => 'ä',
- "\0x8B" => 'č',
- "\0x8C" => 'Ć',
- "\0x8D" => 'ć',
- "\0x8E" => 'é',
- "\0x8F" => 'Ź',
- "\0x90" => 'ź',
- "\0x91" => 'Ď',
- "\0x92" => 'í',
- "\0x93" => 'ď',
- "\0x94" => 'Ē',
- "\0x95" => 'ē',
- "\0x96" => 'Ė',
- "\0x97" => 'ó',
- "\0x98" => 'ė',
- "\0x99" => 'ô',
- "\0x9A" => 'ö',
- "\0x9B" => 'õ',
- "\0x9C" => 'ú',
- "\0x9D" => 'Ě',
- "\0x9E" => 'ě',
- "\0x9F" => 'ü',
- "\0xA0" => '†',
- "\0xA1" => '°',
- "\0xA2" => 'Ę',
- "\0xA3" => '£',
- "\0xA4" => '§',
- "\0xA5" => '•',
- "\0xA6" => '¶',
- "\0xA7" => 'ß',
- "\0xA8" => '®',
- "\0xA9" => '©',
- "\0xAA" => '™',
- "\0xAB" => 'ę',
- "\0xAC" => '¨',
- "\0xAD" => '≠',
- "\0xAE" => 'ģ',
- "\0xAF" => 'Į',
- "\0xB0" => 'į',
- "\0xB1" => 'Ī',
- "\0xB2" => '≤',
- "\0xB3" => '≥',
- "\0xB4" => 'ī',
- "\0xB5" => 'Ķ',
- "\0xB6" => '∂',
- "\0xB7" => '∑',
- "\0xB8" => 'ł',
- "\0xB9" => 'Ļ',
- "\0xBA" => 'ļ',
- "\0xBB" => 'Ľ',
- "\0xBC" => 'ľ',
- "\0xBD" => 'Ĺ',
- "\0xBE" => 'ĺ',
- "\0xBF" => 'Ņ',
- "\0xC0" => 'ņ',
- "\0xC1" => 'Ń',
- "\0xC2" => '¬',
- "\0xC3" => '√',
- "\0xC4" => 'ń',
- "\0xC5" => 'Ň',
- "\0xC6" => '∆',
- "\0xC7" => '«',
- "\0xC8" => '»',
- "\0xC9" => '…',
- "\0xCA" => ' ',
- "\0xCB" => 'ň',
- "\0xCC" => 'Ő',
- "\0xCD" => 'Õ',
- "\0xCE" => 'ő',
- "\0xCF" => 'Ō',
- "\0xD0" => '–',
- "\0xD1" => '—',
- "\0xD2" => '“',
- "\0xD3" => '”',
- "\0xD4" => '‘',
- "\0xD5" => '’',
- "\0xD6" => '÷',
- "\0xD7" => '◊',
- "\0xD8" => 'ō',
- "\0xD9" => 'Ŕ',
- "\0xDA" => 'ŕ',
- "\0xDB" => 'Ř',
- "\0xDC" => '‹',
- "\0xDD" => '›',
- "\0xDE" => 'ř',
- "\0xDF" => 'Ŗ',
- "\0xE0" => 'ŗ',
- "\0xE1" => 'Š',
- "\0xE2" => '‚',
- "\0xE3" => '„',
- "\0xE4" => 'š',
- "\0xE5" => 'Ś',
- "\0xE6" => 'ś',
- "\0xE7" => 'Á',
- "\0xE8" => 'Ť',
- "\0xE9" => 'ť',
- "\0xEA" => 'Í',
- "\0xEB" => 'Ž',
- "\0xEC" => 'ž',
- "\0xED" => 'Ū',
- "\0xEE" => 'Ó',
- "\0xEF" => 'Ô',
- "\0xF0" => 'ū',
- "\0xF1" => 'Ů',
- "\0xF2" => 'Ú',
- "\0xF3" => 'ů',
- "\0xF4" => 'Ű',
- "\0xF5" => 'ű',
- "\0xF6" => 'Ų',
- "\0xF7" => 'ų',
- "\0xF8" => 'Ý',
- "\0xF9" => 'ý',
- "\0xFA" => 'ķ',
- "\0xFB" => 'Ż',
- "\0xFC" => 'Ł',
- "\0xFD" => 'ż',
- "\0xFE" => 'Ģ',
- "\0xFF" => 'ˇ'
- );
-
- $string = str_replace(array_keys($cp10029), array_values($cp10029), $string);
-
- return $string;
-}
-?>
+++ /dev/null
-<?php
-/**
- * decode/cp10079.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10079 (MacIcelandic) decoding function that
- * is needed to read cp10079 encoded mails in non-cp10079 locale.
- *
- * Original data taken from:
- * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/ICELAND.TXT
- *
- * Name: cp10079_MacIcelandic to Unicode table
- * Unicode version: 2.0
- * Table version: 2.00
- * Table format: Format A
- * Date: 04/24/96
- * Authors: Lori Brownell <loribr@microsoft.com>
- * K.D. Chang <a-kchang@microsoft.com>
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode a cp10079 (MacIcelandic) string
- * @param string $string Encoded string
- * @return string $string Decoded string
- */
-function charset_decode_cp10079 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-icelandic')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10079 = array(
- "\0x80" => 'Ä',
- "\0x81" => 'Å',
- "\0x82" => 'Ç',
- "\0x83" => 'É',
- "\0x84" => 'Ñ',
- "\0x85" => 'Ö',
- "\0x86" => 'Ü',
- "\0x87" => 'á',
- "\0x88" => 'à',
- "\0x89" => 'â',
- "\0x8A" => 'ä',
- "\0x8B" => 'ã',
- "\0x8C" => 'å',
- "\0x8D" => 'ç',
- "\0x8E" => 'é',
- "\0x8F" => 'è',
- "\0x90" => 'ê',
- "\0x91" => 'ë',
- "\0x92" => 'í',
- "\0x93" => 'ì',
- "\0x94" => 'î',
- "\0x95" => 'ï',
- "\0x96" => 'ñ',
- "\0x97" => 'ó',
- "\0x98" => 'ò',
- "\0x99" => 'ô',
- "\0x9A" => 'ö',
- "\0x9B" => 'õ',
- "\0x9C" => 'ú',
- "\0x9D" => 'ù',
- "\0x9E" => 'û',
- "\0x9F" => 'ü',
- "\0xA0" => 'Ý',
- "\0xA1" => '°',
- "\0xA2" => '¢',
- "\0xA3" => '£',
- "\0xA4" => '§',
- "\0xA5" => '•',
- "\0xA6" => '¶',
- "\0xA7" => 'ß',
- "\0xA8" => '®',
- "\0xA9" => '©',
- "\0xAA" => '™',
- "\0xAB" => '´',
- "\0xAC" => '¨',
- "\0xAD" => '≠',
- "\0xAE" => 'Æ',
- "\0xAF" => 'Ø',
- "\0xB0" => '∞',
- "\0xB1" => '±',
- "\0xB2" => '≤',
- "\0xB3" => '≥',
- "\0xB4" => '¥',
- "\0xB5" => 'µ',
- "\0xB6" => '∂',
- "\0xB7" => '∑',
- "\0xB8" => '∏',
- "\0xB9" => 'π',
- "\0xBA" => '∫',
- "\0xBB" => 'ª',
- "\0xBC" => 'º',
- "\0xBD" => 'Ω',
- "\0xBE" => 'æ',
- "\0xBF" => 'ø',
- "\0xC0" => '¿',
- "\0xC1" => '¡',
- "\0xC2" => '¬',
- "\0xC3" => '√',
- "\0xC4" => 'ƒ',
- "\0xC5" => '≈',
- "\0xC6" => '∆',
- "\0xC7" => '«',
- "\0xC8" => '»',
- "\0xC9" => '…',
- "\0xCA" => ' ',
- "\0xCB" => 'À',
- "\0xCC" => 'Ã',
- "\0xCD" => 'Õ',
- "\0xCE" => 'Œ',
- "\0xCF" => 'œ',
- "\0xD0" => '–',
- "\0xD1" => '—',
- "\0xD2" => '“',
- "\0xD3" => '”',
- "\0xD4" => '‘',
- "\0xD5" => '’',
- "\0xD6" => '÷',
- "\0xD7" => '◊',
- "\0xD8" => 'ÿ',
- "\0xD9" => 'Ÿ',
- "\0xDA" => '⁄',
- "\0xDB" => '¤',
- "\0xDC" => 'Ð',
- "\0xDD" => 'ð',
- "\0xDE" => 'Þ',
- "\0xDF" => 'þ',
- "\0xE0" => 'ý',
- "\0xE1" => '·',
- "\0xE2" => '‚',
- "\0xE3" => '„',
- "\0xE4" => '‰',
- "\0xE5" => 'Â',
- "\0xE6" => 'Ê',
- "\0xE7" => 'Á',
- "\0xE8" => 'Ë',
- "\0xE9" => 'È',
- "\0xEA" => 'Í',
- "\0xEB" => 'Î',
- "\0xEC" => 'Ï',
- "\0xED" => 'Ì',
- "\0xEE" => 'Ó',
- "\0xEF" => 'Ô',
- "\0xF0" => '',
- "\0xF1" => 'Ò',
- "\0xF2" => 'Ú',
- "\0xF3" => 'Û',
- "\0xF4" => 'Ù',
- "\0xF5" => 'ı',
- "\0xF6" => 'ˆ',
- "\0xF7" => '˜',
- "\0xF8" => '¯',
- "\0xF9" => '˘',
- "\0xFA" => '˙',
- "\0xFB" => '˚',
- "\0xFC" => '¸',
- "\0xFD" => '˝',
- "\0xFE" => '˛',
- "\0xFF" => 'ˇ'
- );
-
- $string = str_replace(array_keys($cp10079), array_values($cp10079), $string);
-
- return $string;
-}
-?>
+++ /dev/null
-<?php
-/**
- * decode/cp10081.php
- * $Id$
- *
- * Copyright (c) 2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This file contains cp10081 (MacTurkish) decoding function that
- * is needed to read cp10081 encoded mails in non-cp10081 locale.
- *
- * Original data taken from:
- * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/TURKISH.TXT
- *
- * Name: cp10081_MacTurkish to Unicode table
- * Unicode version: 2.0
- * Table version: 2.00
- * Table format: Format A
- * Date: 04/24/96
- * Authors: Lori Brownell <loribr@microsoft.com>
- * K.D. Chang <a-kchang@microsoft.com>
- * @package squirrelmail
- * @subpackage decode
- */
-
-/**
- * Decode cp10081(MacTurkish) encoded string
- * @param string $string Encoded string
- * @return string $string Decoded string
- */
-function charset_decode_cp10081 ($string) {
- global $default_charset;
-
- if (strtolower($default_charset) == 'x-mac-turkish')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
- return $string;
-
- $cp10081 = array(
- "\0x80" => 'Ä',
- "\0x81" => 'Å',
- "\0x82" => 'Ç',
- "\0x83" => 'É',
- "\0x84" => 'Ñ',
- "\0x85" => 'Ö',
- "\0x86" => 'Ü',
- "\0x87" => 'á',
- "\0x88" => 'à',
- "\0x89" => 'â',
- "\0x8A" => 'ä',
- "\0x8B" => 'ã',
- "\0x8C" => 'å',
- "\0x8D" => 'ç',
- "\0x8E" => 'é',
- "\0x8F" => 'è',
- "\0x90" => 'ê',
- "\0x91" => 'ë',
- "\0x92" => 'í',
- "\0x93" => 'ì',
- "\0x94" => 'î',
- "\0x95" => 'ï',
- "\0x96" => 'ñ',
- "\0x97" => 'ó',
- "\0x98" => 'ò',
- "\0x99" => 'ô',
- "\0x9A" => 'ö',
- "\0x9B" => 'õ',
- "\0x9C" => 'ú',
- "\0x9D" => 'ù',
- "\0x9E" => 'û',
- "\0x9F" => 'ü',
- "\0xA0" => '†',
- "\0xA1" => '°',
- "\0xA2" => '¢',
- "\0xA3" => '£',
- "\0xA4" => '§',
- "\0xA5" => '•',
- "\0xA6" => '¶',
- "\0xA7" => 'ß',
- "\0xA8" => '®',
- "\0xA9" => '©',
- "\0xAA" => '™',
- "\0xAB" => '´',
- "\0xAC" => '¨',
- "\0xAD" => '≠',
- "\0xAE" => 'Æ',
- "\0xAF" => 'Ø',
- "\0xB0" => '∞',
- "\0xB1" => '±',
- "\0xB2" => '≤',
- "\0xB3" => '≥',
- "\0xB4" => '¥',
- "\0xB5" => 'µ',
- "\0xB6" => '∂',
- "\0xB7" => '∑',
- "\0xB8" => '∏',
- "\0xB9" => 'π',
- "\0xBA" => '∫',
- "\0xBB" => 'ª',
- "\0xBC" => 'º',
- "\0xBD" => 'Ω',
- "\0xBE" => 'æ',
- "\0xBF" => 'ø',
- "\0xC0" => '¿',
- "\0xC1" => '¡',
- "\0xC2" => '¬',
- "\0xC3" => '√',
- "\0xC4" => 'ƒ',
- "\0xC5" => '≈',
- "\0xC6" => '∆',
- "\0xC7" => '«',
- "\0xC8" => '»',
- "\0xC9" => '…',
- "\0xCA" => ' ',
- "\0xCB" => 'À',
- "\0xCC" => 'Ã',
- "\0xCD" => 'Õ',
- "\0xCE" => 'Œ',
- "\0xCF" => 'œ',
- "\0xD0" => '–',
- "\0xD1" => '—',
- "\0xD2" => '“',
- "\0xD3" => '”',
- "\0xD4" => '‘',
- "\0xD5" => '’',
- "\0xD6" => '÷',
- "\0xD7" => '◊',
- "\0xD8" => 'ÿ',
- "\0xD9" => 'Ÿ',
- "\0xDA" => 'Ğ',
- "\0xDB" => 'ğ',
- "\0xDC" => 'İ',
- "\0xDD" => 'ı',
- "\0xDE" => 'Ş',
- "\0xDF" => 'ş',
- "\0xE0" => '‡',
- "\0xE1" => '·',
- "\0xE2" => '‚',
- "\0xE3" => '„',
- "\0xE4" => '‰',
- "\0xE5" => 'Â',
- "\0xE6" => 'Ê',
- "\0xE7" => 'Á',
- "\0xE8" => 'Ë',
- "\0xE9" => 'È',
- "\0xEA" => 'Í',
- "\0xEB" => 'Î',
- "\0xEC" => 'Ï',
- "\0xED" => 'Ì',
- "\0xEE" => 'Ó',
- "\0xEF" => 'Ô',
- "\0xF0" => '',
- "\0xF1" => 'Ò',
- "\0xF2" => 'Ú',
- "\0xF3" => 'Û',
- "\0xF4" => 'Ù',
- "\0xF5" => '',
- "\0xF6" => 'ˆ',
- "\0xF7" => '˜',
- "\0xF8" => '¯',
- "\0xF9" => '˘',
- "\0xFA" => '˙',
- "\0xFB" => '˚',
- "\0xFC" => '¸',
- "\0xFD" => '˝',
- "\0xFE" => '˛',
- "\0xFF" => 'ˇ'
- );
-
- $string = str_replace(array_keys($cp10081), array_values($cp10081), $string);
-
- return $string;
-}
-?>
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_1 ($string) {
+function charset_decode_iso_8859_1 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-1')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_10 ($string) {
+function charset_decode_iso_8859_10 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-10')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_11 ($string) {
+function charset_decode_iso_8859_11 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-11')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_13 ($string) {
+function charset_decode_iso_8859_13 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-13')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_14 ($string) {
+function charset_decode_iso_8859_14 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-14')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_15 ($string) {
+function charset_decode_iso_8859_15 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-15')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_16 ($string) {
+function charset_decode_iso_8859_16 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-16')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_2 ($string) {
+function charset_decode_iso_8859_2 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-2')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_3 ($string) {
+function charset_decode_iso_8859_3 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-3')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_4 ($string) {
+function charset_decode_iso_8859_4 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-4')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_5 ($string) {
+function charset_decode_iso_8859_5 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-5')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_6 ($string) {
+function charset_decode_iso_8859_6 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-6')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_7 ($string) {
+function charset_decode_iso_8859_7 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso-8859-7')
* @param string $string Encoded string
* @return string $string Decoded string
*/
-function charset_decode_iso8859_8 ($string) {
+function charset_decode_iso_8859_8 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso8859-8')
* @param string $string Encoded string
* @return string Decoded string
*/
-function charset_decode_iso8859_9 ($string) {
+function charset_decode_iso_8859_9 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'iso8859-9')
* @param string $string Encoded string
* @return string Decoded string
*/
-function charset_decode_koi8r ($string) {
+function charset_decode_koi8_r ($string) {
global $default_charset;
if (strtolower($default_charset) == 'koi8-r')
* @param string $string Encoded string
* @return string Decoded string
*/
-function charset_decode_koi8u ($string) {
+function charset_decode_koi8_u ($string) {
global $default_charset;
if (strtolower($default_charset) == 'koi8-u')
* @param string $string Encoded string
* @return string Decoded string
*/
-function charset_decode_tis620 ($string) {
+function charset_decode_tis_620 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'tis-620')
* @param string $string Encoded string
* @return string Decoded string
*/
-function charset_decode_utf8 ($string) {
+function charset_decode_utf_8 ($string) {
global $default_charset;
if (strtolower($default_charset) == 'utf-8')