/* ***** Turkish (ISO-8859-9) to UTF-8 ********************************* * Copyright (c) 2004 Brian Huisman AKA GreyWyvern - v1.0 * PHP encoding converter from ISO-8859-9 to UTF-8 * * Modified for PHP from the original Perl as taken from NexTrieve-0.41 * http://backpan.perl.org/authors/id/E/EL/ELIZABETH/NexTrieve-0.41.tar.gz * * Copyright (c) 1995-2003 Elizabeth Mattijsen . All * rights reserved. * This program is free software; you can redistribute it and/or modify * it under the same terms as Perl itself. ********************************************************************* */ function iso88599_2utf8($input) { static $iso88599; if (!count($iso88599)) $iso88599 = array( '€', '', '‚', 'ƒ', '„', '…', '†', '‡', 'ˆ', '‰', 'Š', '‹', 'Œ', '', 'Ž', '', '', '‘', '’', '“', '”', '•', '–', '—', '˜', '™', 'š', '›', 'œ', '', 'ž', 'Ÿ', ' ', '¡', '¢', '£', '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '­', '®', '¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ğ', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'İ', 'Ş', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ğ', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ı', 'ş', 'ÿ'); return preg_replace("/([\x80-\xFF])/e", '$iso88599[ord($1) - 0x80]', $input); }