Location: PHPKode > scripts > AfterLogic WebMail Lite PHP > afterlogic-webmail-lite-php/webmail/common/utf8encode/windows-1255.php
<?php

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

		return str_replace(array_keys($mapping), array_values($mapping), $string);
	}

Return current item: AfterLogic WebMail Lite PHP