Re: htmlspecialchars and UTF-8

From: Date: Thu, 05 Dec 2002 08:38:52 +0000
Subject: Re: htmlspecialchars and UTF-8
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-371@lists.php.net to get a copy of this message
On Wednesday, December 4, 2002, at 01:37 PM, Renato De Giovanni wrote:
What happens is that "htmlspecialchars" seems to be always returning a latin1 string, therefore causing problems with the generated document supposedly utf-8 encoded. My question is: is this a php bug or am I misunderstanding something related to multi-byte character support?
It's probable that it's a PHP...erm..."fact of life" right now. I ran into similar problems with iso-8859-7 and -9, using both htmlspecialchars and htmlentities with the (optional) 3rd parameter. Things worked unpredictably. In the PHP build I have now (4.4ish, from recent CVS), htmlspecialchars actually prints out a PHP error message (E_WARNING, I believe) that: "ISO-8859-7 is not supported by htmlspecialchars(); assuming ISO-8859-1" So I wouldn't be surprised if you weren't running into this problem, which wasn't officially recognized until after 4.2 was released. Look at bugs.php.net for related bugs...it's the only good way to keep up on the issue, which seems to be evolving... Cheers, spud.
PHP version is 4.2.3 Thank you very much! -- Renato CRIA - Centro de Referencia em Informacao Ambiental http://www.cria.org.br/ -- This message has been scanned for viruses and dangerous content and is believed to be clean. -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -------------------------------------------------------------------
a.h.s. boy
spud(at)nothingness.org            "as yes is to if,love is to yes"
http://www.nothingness.org/ -------------------------------------------------------------------

« previous php.i18n (#371) next »