You are here: Re: unicode entities from characters « PHP Programming Language « IT news, forums, messages
Re: unicode entities from characters

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация