Re: Attempt at putting greedy htmlspecialchars on a diet
| From: | Curt Zirzow | Date: | Sun, 05 Oct 2003 02:25:36 +0000 |
| Subject: | Re: Attempt at putting greedy htmlspecialchars on a diet | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165074@lists.php.net to get a copy of this message | ||
* Thus wrote Gerard Samuel (gsam@trini0.org):
> - Edwin - wrote:
>
> >"Far east languages" are not necessarily in this form: "&#nnnnn;"
> >So,
> >
> >running htmlspecialchars() on, say, Japanese characters would do NO
> >harm since &, ", ', <, > are NOT Japanese characters ;)
> >
> >Or, am I missing something? :)
> >
> Not exactly. When storing "far east languages" in a database for
> example, thats the format its stored as.
> &#xxxxx;
> Also, I've seen it in that form in the $_POST array from a form.
That is an html entity and is not how it is stored. How that entity
gets displayed depends entirely on what encoding you have set for
the page.
The japanese characters (charset ISO-2022-JP) to use to display the
phrase for 'Contents' is:
^[$B$3$s$F$s$D^[(B
(^[ == escape character)
I can store those exact characters (with the proper escape
character) in a database without a problem
Curt
--
List Stats: http://zirzow.dyndns.org/html/mlists/php_general/
"I used to think I was indecisive, but now I'm not so sure."