6 * This file contains cp855 decoding function that is needed to read
7 * cp855 encoded mails in non-cp855 locale.
9 * Original data taken from:
10 * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP855.TXT
11 * Name: cp855_DOSCyrillic to Unicode table
12 * Unicode version: 2.0
14 * Table format: Format A
16 * Authors: Lori Brownell <loribr@microsoft.com>
17 * K.D. Chang <a-kchang@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 a cp855-encoded string
28 * @param string $string Encoded string
29 * @return string $string Decoded string
31 function charset_decode_cp855 ($string) {
32 // don't do decoding when there are no 8bit symbols
33 if (! sq_is8bit($string,'ibm855'))
167 $string = str_replace(array_keys($cp855), array_values($cp855), $string);