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(
"ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" =>
"Ã",
"ÃÂ" => "Ã", 'ÃÂ' => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" =>
"Ã",
"ÃÂ" => "Ã", "Ãâ" => "Ã", "ÃË" => "Ã", "ÃÂ" => "Ã", "ÃÂ"
=> "ç",
"Ãâ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ" => "Ã", "ÃÂ"
=> "ð",
"ÃÂ" => "ú", "ÃÂ" => "á", "ÃÂ" => "â"
);
$str = strtr($str, $translation);
Both methods are simpler and a lot faster than regexps.
Hth Henrik Hornemann
-----Oprindelig meddelelse-----
Fra: mario [mailto:[EMAIL PROTECTED]
Sendt: 23. februar 2005 19:34
Til: [email protected]; [email protected]
Cc: Burhan Khalid; Guillermo Rauch
Emne: [PHP-DB] 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