Re: htmlspecialchars and UTF-8
| From: | Moriyoshi Koizumi | Date: | Fri, 06 Dec 2002 03:17:00 +0000 |
| Subject: | Re: htmlspecialchars and UTF-8 | ||
| References: | 1 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-375@lists.php.net to get a copy of this message | ||
Hi,
For your interest: htmlentities() and htmlspecialchars() support following
codesets in 4.3.0.
ISO-8859-1 (alias: ISO8859-1)
ISO-8859-15 (alias: ISO8859-15)
UTF-8
cp1252 (alias: Windows-1252, 1252)
BIG5 (alias: 950)
GB2312 (alias: 936)
BIG5-HKSCS
Shift_JIS (alias: SJIS, 932)
EUCJP (alias: EUC-JP)
Regards,
Moriyoshi
"a.h.s. boy" <spudlists@nothingness.org> wrote:
> 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/
> -------------------------------------------------------------------
>
>
> --
> PHP Internationalization Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>