root/trunk/includes/removeaccents.inc.php
| Revision 1, 2.2 KB (checked in by anonymous, 7 years ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | /****************************************************** Open .node *** |
| 3 | * Description: |
| 4 | * Status: Stable. |
| 5 | * Author: Alexandre Dath <alexandre@dotnode.com> |
| 6 | * $Id$ |
| 7 | * |
| 8 | * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software Foundation, |
| 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 23 | ******************** http://opensource.ikse.net/projects/dotnode ***/ |
| 24 | |
| 25 | |
| 26 | function removeaccents($string){ |
| 27 | $Caracs = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A", |
| 28 | "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A", |
| 29 | "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E", |
| 30 | "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I", |
| 31 | "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N", |
| 32 | "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O", |
| 33 | "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U", |
| 34 | "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s", |
| 35 | "à" => "a", "á" => "a", "â" => "a", "ã" => "a", |
| 36 | "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c", |
| 37 | "è" => "e", "é" => "e", "ê" => "e", "ë" => "e", |
| 38 | "ì" => "i", "í" => "i", "î" => "i", "ï" => "i", |
| 39 | "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o", |
| 40 | "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o", |
| 41 | "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u", |
| 42 | "ý" => "y", "ÿ" => "y"); |
| 43 | |
| 44 | $string = strtr("$string", $Caracs); |
| 45 | return $string; |
| 46 | } |
| 47 | |
| 48 | |
| 49 | ?> |
Note: See TracBrowser
for help on using the browser.
