Re: Default input encoding for htmlspecialchars/htmlentities

From: Date: Thu, 23 Aug 2012 16:21:35 +0000
Subject: Re: Default input encoding for htmlspecialchars/htmlentities
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-62433@lists.php.net to get a copy of this message
On 23/08/12 17:15, Rasmus Lerdorf wrote:
On 08/23/2012 09:09 AM, Andrew Faulds wrote:
Personally, I think you should have just two encodings: page_encoding and internal_encoding. The former is for form input and page output (could be latin-1, for instance), and internal_encoding is the internal representation (default to utf-8 - you can deal with all of, say, latin-1, as well as unicode entities). Input and output, on the web at least, are almost always going to match.
No, we need 3. The internal/script encoding doesn't have to be the same as the input encoding. It isn't common in the Western world, but elsewhere people do write their scripts in their local encoding which may very well be different from their input and/or output encodings. -Rasmus Oh, you mean script encoding, form input/page output encoding and internal representation?
Because I don't see a need for differing default input (i.e. file/form input) and default output (i.e. page/file output) encodings. -- Andrew Faulds http://ajf.me/

« previous php.internals (#62433) next »