[Fusionforge-commits] r11078 - trunk/src/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Oct 19 21:32:58 CEST 2010


Author: lolando
Date: 2010-10-19 21:32:58 +0200 (Tue, 19 Oct 2010)
New Revision: 11078

Modified:
   trunk/src/common/include/utils.php
Log:
Let iconv do the work of removing accents

Modified: trunk/src/common/include/utils.php
===================================================================
--- trunk/src/common/include/utils.php	2010-10-19 19:22:52 UTC (rev 11077)
+++ trunk/src/common/include/utils.php	2010-10-19 19:32:58 UTC (rev 11078)
@@ -1012,11 +1012,7 @@
  * @return 	string
  */
 function util_strip_accents($text) {
-	$find = utf8_decode($text);
-	$find = strtr($find,
-		utf8_decode('àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ'),
-		'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
-	return utf8_encode($find);
+	return iconv ('UTF-8', 'US-ASCII//TRANSLIT', $text) ;
 }
 
 /**




More information about the Fusionforge-commits mailing list