|
Posted by Benjamin Esham on 09/02/06 22:03
Platero wrote:
> Hi, is there a way to convert special characters inserted by a user in a
> form INTO unicode entities? The output format should be numeric:
> --->""", not "'". I tried htmlentities and htmlspecialchars but
> they don't convert "à","è","é" etc. Should I write a custom function? I
> can't find a native one. Thanks. :-)
Take a look at
http://us3.php.net/manual/en/function.utf8-encode.php
Specifically, the second comment, by user rocketman, may help you. (I have
no idea whether or not his function works, but if it does it might be what
you're looking for.)
The ord() function may also help, but be careful! It only works on ASCII
values, so it may not help at all.
http://us2.php.net/ord
HTH,
--
Benjamin D. Esham
bdesham@gmail.com | AIM: bdesham128 | Jabber: same as e-mail
"I'm tall," said Ron inconsequentially.
— an amusing-without-context line from HBP
Navigation:
[Reply to this message]
|