SV: Accents! Pls help. Still very confused.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

It is not quite clear what you want to do. You can translate UTF-8 characters into html characters like this:
$str = htmlentities($str,ENT_NOQUOTES,'UTF-8'); 
Or you can translate them in a costumizesd way with strtr()
For instance:
$translation = array(
      "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã",
      "ÃÂ" => "Ã", 'ÃÂ' => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã",
       "ÃÂ" => "Ã", "Ãâ" => "Ã", "ÃË" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "ç",
       "Ãâ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "ð",
       "ÃÂ" => "&uacute", "ÃÂ" => "&aacute", "ÃÂ" => "&acirc"
);
$str = strtr($str, $translation);
Both methods are simpler and a lot faster than regexps.

Hth Henrik Hornemann


-----Oprindelig meddelelse-----
Fra: mario [mailto:chiari.hm@xxxxxxxxxxx] 
Sendt: 23. februar 2005 19:34
Til: php-general@xxxxxxxxxxxxx; php-db@xxxxxxxxxxxxx
Cc: Burhan Khalid; Guillermo Rauch
Emne:  Accents! Pls help. Still very confused.

Hello,

I am still very puzzled.
If you a couple of minutes of spare time, pls give a look at http://www.chiari.org/help/ and suggest a way out.

Thanks a lot.
mario

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux