47f5365c54a001824eb11a6ab8b67fca8bb5a7b8
4 * decode/iso-ir-111.php
6 * This file contains iso-ir-111 decoding function that is needed to read
7 * iso-ir-111 encoded mails in non-iso-ir-111 locale.
9 * Original data taken from:
10 * http://crl.nmsu.edu/~mleisher/csets/ISOIR111.TXT
12 * Original ID: Id: ISOIR111.TXT,v 1.2 1999/08/23 18:34:15 mleisher Exp
13 * Name: ISO IR 111/ECMA Cyrillic to Unicode 2.1 mapping table.
14 * Typed in by hand from
15 * http://www.fingertipsoft.com/ref/cyrillic/charsets.html
16 * Author: Mark Leisher <mleisher@crl.nmsu.edu>
20 * Copyright 1999 Computing Research Labs, New Mexico State University
22 * Permission is hereby granted, free of charge, to any person obtaining a
23 * copy of this software and associated documentation files (the ""Software""),
24 * to deal in the Software without restriction, including without limitation
25 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
26 * and/or sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following conditions:
29 * The above copyright notice and this permission notice shall be included in
30 * all copies or substantial portions of the Software.
32 * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
35 * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
36 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
37 * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
38 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 * @copyright 2003-2020 The SquirrelMail Project Team
41 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
43 * @package squirrelmail
48 * Decode iso-ir-111 encoded strings
49 * @param string $string Encoded string
50 * @return string Decoded string
52 function charset_decode_iso_ir_111 ($string) {
53 // don't do decoding when there are no 8bit symbols
54 if (! sq_is8bit($string,'iso-ir-111'))
156 $string = str_replace(array_keys($iso_ir_111), array_values($iso_ir_111), $string);