268ef2c64b4fd223d871f676dc89e4e1752bfa66
6 * Copyright (c) 2003 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This file contains cp1253 decoding function that is needed to read
10 * cp1253 encoded mails in non-cp1253 locale.
12 * Original data taken from:
13 * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT
15 * Name: cp1253 to Unicode table
16 * Unicode version: 2.0
18 * Table format: Format A
20 * Contact: cpxlate@microsoft.com
24 function charset_decode_cp1253 ($string) {
25 global $default_charset;
27 if (strtolower($default_charset) == 'windows-1253')
30 /* Only do the slow convert if there are 8-bit characters */
31 /* avoid using 0xA0 (\240) in ereg ranges. RH73 does not like that */
32 if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
118 "\xD2" => '�',
166 $string = str_replace(array_keys($cp1253), array_values($cp1253), $string);