#22524 [Opn->Bgs]: Add a strip_accents function
| From: | sniper@php.net | Date: | Mon, 14 Apr 2003 01:47:18 +0000 |
| Subject: | #22524 [Opn->Bgs]: Add a strip_accents function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37625@lists.php.net to get a copy of this message | ||
ID: 22524
Updated by: sniper@php.net
Reported By: gmarchand at videotron dot ca
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 4.2.3
New Comment:
http://www.php.net/manual/en/function.strtr.php
Previous Comments:
------------------------------------------------------------------------
[2003-03-03 15:45:35] gmarchand at videotron dot ca
It would be awesome if PHP had the strip_accents() function. Something
like strip_tags(), only it removes the accented letters and replace
them with their non-accented version.
For example:
<? echo strip_accents("Bonjour Véronique, comment ça va?") ?>
gives: Bonjour Veronique, comment ca va?
I suppose it would be even better if you could have an optional
parameter of allowable accents too.
It would be very useful for searching databases.
For example: on my site, people can search a music band database, but
if they don't have the umlauts on their keyboards, and if they search
for a band like say "Mötley Crüe" without typing the umlauts they might
not find it. So I have to use an alternate spelling field, but it would
be awesome if there were a built-in strip_accents() function. I'm sure
it could have many many more applications too :)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22524&edit=1