note 50532 deleted from function.strtr by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 10:15:57 +0000 |
| Subject: | note 50532 deleted from function.strtr by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196953@lists.php.net to get a copy of this message | ||
Note Submitter: Stian
----
elonen forgot the ø character (\xf8)
A (more) complete accent remover:
$txt = strtr($txt,
"\xe1\xc1\xe0\xc0\xe2\xc2\xe4\xc4\xe3\xc3\xe5\xc5".
"\xaa\xe7\xc7\xe9\xc9\xe8\xc8\xea\xca\xeb\xcb\xed".
"\xcd\xec\xcc\xee\xce\xef\xcf\xf1\xd1\xf3\xd3\xf2".
"\xd2\xf4\xd4\xf6\xd6\xf5\xd5\x8\xd8\xba\xf0\xfa\xda".
"\xf9\xd9\xfb\xdb\xfc\xdc\xfd\xdd\xff\xe6\xc6\xdf\xf8",
"aAaAaAaAaAaAacCeEeEeEeEiIiIiIiInNo".
"OoOoOoOoOoOoouUuUuUuUyYyaAso");