6 * This file contains cp1252 decoding function that is needed to read
7 * cp1252 encoded mails in non-cp1252 locale.
9 * Original data taken from:
10 * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT
12 * Name: cp1252 to Unicode table
13 * Unicode version: 2.0
15 * Table format: Format A
17 * Contact: cpxlate@microsoft.com
19 * @copyright © 2003-2006 The SquirrelMail Project Team
20 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
22 * @package squirrelmail
27 * Decode cp1252-encoded string
28 * @param string $string Encoded string
29 * @return string $string Decoded string
32 function charset_decode_cp1252 ($string) {
33 // don't do decoding when there are no 8bit symbols
34 if (! sq_is8bit($string,'windows-1252'))
168 $string = str_replace(array_keys($cp1252), array_values($cp1252), $string);