Easy to solve AI 3093: tags cloud should ignore case and accents

"Aurélio A. Heckert" aurelio at colivre.coop.br
Fri Apr 11 16:40:16 BRT 2014


Something more "legible" with letters over charcodes may be better to 
maintain and extend.
Have you the source of this list of conversion or that is "home made"?

Still needing ligatures...

See the function *capitalise* on this source:
http://noosfero.org/System/UserRegistration?raw=on
I still not happy, but that translates ligatures.

On 11-04-2014 15:06, daniel tygel wrote:
> Hi Aurium and others,
>
>    The one we use in fbes.org.br is the following (php):
>
> function remove_accents($text) {
> 	
> 		$tab['without_accents']=array(192=>"A", 193=>"A", 194=>"A", 195=>"A", 196=>"A", 197=>"A", 198=>"A", 199=>"C", 200=>"E", 201=>"E", 202=>"E", 203=>"E", 204=>"I", 205=>"I", 206=>"I", 207=>"I", 208=>"O", 209=>"N", 210=>"O", 211=>"O", 212=>"O", 213=>"O", 214=>"O", 216=>"O", 217=>"U", 218=>"U", 219=>"U", 220=>"U", 221=>"Y", 224=>"a", 225=>"a", 226=>"a", 227=>"a", 228=>"a", 229=>"a", 230=>"a", 231=>"c", 232=>"e", 233=>"e", 234=>"e", 235=>"e", 236=>"i", 237=>"i", 238=>"i", 239=>"i", 241=>"n", 242=>"o", 243=>"o", 244=>"o", 245=>"o", 246=>"o", 248=>"o", 249=>"u", 250=>"u", 251=>"u", 252=>"u", 253=>"y", 255=>"y");
> 		$tab['with_accents']=array(chr(192), chr(193), chr(194), chr(195), chr(196), chr(197), chr(198), chr(199), chr(200), chr(201), chr(202), chr(203), chr(204), chr(205), chr(206), chr(207), chr(208), chr(209), chr(210), chr(211), chr(212), chr(213), chr(214), chr(216), chr(217), chr(218), chr(219), chr(220), chr(221), chr(224), chr(225), chr(226), chr(227), chr(228), chr(229), chr(230), chr(231), chr(232), chr(233), chr(234), chr(235), chr(236), chr(237), chr(238), chr(239), chr(241), chr(242), chr(243), chr(244), chr(245), chr(246), chr(248), chr(249), chr(250), chr(251), chr(252), chr(253), chr(255));
> 		$text=str_replace($tab['with_accents'],$tab['without_accents'],$text);
> 		return $text;
> 	}
>      I hope it can be useful,
>
>             daniel

-- 

*Aurélio A. Heckert (aka Aurium)*
http://softwarelivre.org/aurium
*COLIVRE --- Coop. de Tecnologias Livres*
http://colivre.coop.br

*Inkscape* --- Desenhe Livremente
http://inkscapeBrasil.org
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20140411/bee0ade9/attachment.html>
-------------- Pr?xima Parte ----------
Um anexo n?o-texto foi limpo...
Nome: logoColivre_p.gif
Tipo: image/gif
Tamanho: 5576 bytes
Descri??o: n?o dispon?vel
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20140411/bee0ade9/attachment.gif>


More information about the Noosfero-dev mailing list