3 * decode/iso8859-14.php
6 * Copyright (c) 1999-2003 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This file contains iso-8859-14 decoding function that is needed to read
10 * iso-8859-14 encoded mails in non-iso-8859-14 locale.
12 * Original data taken from:
13 * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT
15 * Name: ISO/IEC 8859-14:1998 to Unicode
16 * Unicode version: 3.0
18 * Table format: Format A
20 * Authors: Markus Kuhn <mkuhn@acm.org>
21 * Ken Whistler <kenw@sybase.com>
24 * Copyright (c) 1999 Unicode, Inc. All Rights reserved.
26 * This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
27 * No claims are made as to fitness for any particular purpose. No
28 * warranties of any kind are expressed or implied. The recipient
29 * agrees to determine applicability of information provided. If this
30 * file has been provided on optical media by Unicode, Inc., the sole
31 * remedy for any claim will be exchange of defective media within 90
34 * Unicode, Inc. hereby grants the right to freely use the information
35 * supplied in this file in the creation of products supporting the
36 * Unicode Standard, and to make copies of this file in any form for
37 * internal or external distribution as long as this notice remains
41 function charset_decode_iso8859_14 ($string) {
42 global $default_charset;
44 if (strtolower($default_charset) == 'iso-8859-14')
47 /* Only do the slow convert if there are 8-bit characters */
48 /* there is no 0x80-0x9F letters in ISO8859-* */
49 if ( ! ereg("[\241-\377]", $string) )
151 $string = str_replace(array_keys($iso8869_14), array_values($iso8859_14), $string);