Location: PHPKode > scripts > AfterLogic WebMail Lite PHP > afterlogic-webmail-lite-php/webmail/common/utf8decode/iso-8859-5.php
<?php

	/**
	 * Original data taken from:
	 * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT
	 * @param string $string
	 * @return string
	 */
	function charset_decode_iso_8859_5($string)
	{
		$mapping = array(
					"\x80" => "\xC2\x80",
					"\x81" => "\xC2\x81",
					"\x82" => "\xC2\x82",
					"\x83" => "\xC2\x83",
					"\x84" => "\xC2\x84",
					"\x85" => "\xC2\x85",
					"\x86" => "\xC2\x86",
					"\x87" => "\xC2\x87",
					"\x88" => "\xC2\x88",
					"\x89" => "\xC2\x89",
					"\x8A" => "\xC2\x8A",
					"\x8B" => "\xC2\x8B",
					"\x8C" => "\xC2\x8C",
					"\x8D" => "\xC2\x8D",
					"\x8E" => "\xC2\x8E",
					"\x8F" => "\xC2\x8F",
					"\x90" => "\xC2\x90",
					"\x91" => "\xC2\x91",
					"\x92" => "\xC2\x92",
					"\x93" => "\xC2\x93",
					"\x94" => "\xC2\x94",
					"\x95" => "\xC2\x95",
					"\x96" => "\xC2\x96",
					"\x97" => "\xC2\x97",
					"\x98" => "\xC2\x98",
					"\x99" => "\xC2\x99",
					"\x9A" => "\xC2\x9A",
					"\x9B" => "\xC2\x9B",
					"\x9C" => "\xC2\x9C",
					"\x9D" => "\xC2\x9D",
					"\x9E" => "\xC2\x9E",
					"\x9F" => "\xC2\x9F",
					"\xA0" => "\xC2\xA0",
					"\xA1" => "\xD0\x81",
					"\xA2" => "\xD0\x82",
					"\xA3" => "\xD0\x83",
					"\xA4" => "\xD0\x84",
					"\xA5" => "\xD0\x85",
					"\xA6" => "\xD0\x86",
					"\xA7" => "\xD0\x87",
					"\xA8" => "\xD0\x88",
					"\xA9" => "\xD0\x89",
					"\xAA" => "\xD0\x8A",
					"\xAB" => "\xD0\x8B",
					"\xAC" => "\xD0\x8C",
					"\xAD" => "\xC2\xAD",
					"\xAE" => "\xD0\x8E",
					"\xAF" => "\xD0\x8F",
					"\xB0" => "\xD0\x90",
					"\xB1" => "\xD0\x91",
					"\xB2" => "\xD0\x92",
					"\xB3" => "\xD0\x93",
					"\xB4" => "\xD0\x94",
					"\xB5" => "\xD0\x95",
					"\xB6" => "\xD0\x96",
					"\xB7" => "\xD0\x97",
					"\xB8" => "\xD0\x98",
					"\xB9" => "\xD0\x99",
					"\xBA" => "\xD0\x9A",
					"\xBB" => "\xD0\x9B",
					"\xBC" => "\xD0\x9C",
					"\xBD" => "\xD0\x9D",
					"\xBE" => "\xD0\x9E",
					"\xBF" => "\xD0\x9F",
					"\xC0" => "\xD0\xA0",
					"\xC1" => "\xD0\xA1",
					"\xC2" => "\xD0\xA2",
					"\xC3" => "\xD0\xA3",
					"\xC4" => "\xD0\xA4",
					"\xC5" => "\xD0\xA5",
					"\xC6" => "\xD0\xA6",
					"\xC7" => "\xD0\xA7",
					"\xC8" => "\xD0\xA8",
					"\xC9" => "\xD0\xA9",
					"\xCA" => "\xD0\xAA",
					"\xCB" => "\xD0\xAB",
					"\xCC" => "\xD0\xAC",
					"\xCD" => "\xD0\xAD",
					"\xCE" => "\xD0\xAE",
					"\xCF" => "\xD0\xAF",
					"\xD0" => "\xD0\xB0",
					"\xD1" => "\xD0\xB1",
					"\xD2" => "\xD0\xB2",
					"\xD3" => "\xD0\xB3",
					"\xD4" => "\xD0\xB4",
					"\xD5" => "\xD0\xB5",
					"\xD6" => "\xD0\xB6",
					"\xD7" => "\xD0\xB7",
					"\xD8" => "\xD0\xB8",
					"\xD9" => "\xD0\xB9",
					"\xDA" => "\xD0\xBA",
					"\xDB" => "\xD0\xBB",
					"\xDC" => "\xD0\xBC",
					"\xDD" => "\xD0\xBD",
					"\xDE" => "\xD0\xBE",
					"\xDF" => "\xD0\xBF",
					"\xE0" => "\xD1\x80",
					"\xE1" => "\xD1\x81",
					"\xE2" => "\xD1\x82",
					"\xE3" => "\xD1\x83",
					"\xE4" => "\xD1\x84",
					"\xE5" => "\xD1\x85",
					"\xE6" => "\xD1\x86",
					"\xE7" => "\xD1\x87",
					"\xE8" => "\xD1\x88",
					"\xE9" => "\xD1\x89",
					"\xEA" => "\xD1\x8A",
					"\xEB" => "\xD1\x8B",
					"\xEC" => "\xD1\x8C",
					"\xED" => "\xD1\x8D",
					"\xEE" => "\xD1\x8E",
					"\xEF" => "\xD1\x8F",
					"\xF0" => "\xE2\x84\x96",
					"\xF1" => "\xD1\x91",
					"\xF2" => "\xD1\x92",
					"\xF3" => "\xD1\x93",
					"\xF4" => "\xD1\x94",
					"\xF5" => "\xD1\x95",
					"\xF6" => "\xD1\x96",
					"\xF7" => "\xD1\x97",
					"\xF8" => "\xD1\x98",
					"\xF9" => "\xD1\x99",
					"\xFA" => "\xD1\x9A",
					"\xFB" => "\xD1\x9B",
					"\xFC" => "\xD1\x9C",
					"\xFD" => "\xC2\xA7",
					"\xFE" => "\xD1\x9E",
					"\xFF" => "\xD1\x9F");

		$outStr = '';
    	for ($i = 0, $len = strlen($string); $i < $len; $i++)
    	{
    		$outStr .= (array_key_exists($string{$i}, $mapping))?$mapping[$string{$i}]:$string{$i};
		}
		
		return $outStr;
	}

Return current item: AfterLogic WebMail Lite PHP