Re: Default input encoding for htmlspecialchars/htmlentities

From: Date: Thu, 23 Aug 2012 16:15:00 +0000
Subject: Re: Default input encoding for htmlspecialchars/htmlentities
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-62430@lists.php.net to get a copy of this message
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

« previous php.internals (#62430) next »