Re: default charset confusion
| From: | Pierre Joye | Date: | Mon, 12 Mar 2012 20:19:59 +0000 |
| Subject: | Re: default charset confusion | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-58892@lists.php.net to get a copy of this message | ||
hi Rasmus,
On Mon, Mar 12, 2012 at 9:12 PM, Rasmus Lerdorf <rasmus@lerdorf.com> wrote:
> If everything was UTF-8 we wouldn't have any of these issues.
> Unfortunately that isn't the case. The question is what to do with apps
> that need to deal with non UTF-8 data. Are we going to provide any help
> to them beyond just telling them to convert everything to UTF-8?
That's not really an acceptable solution, obviously.
> We took steps in 5.4 to improve htmlspecialchars to understand more
> encodings and we have the concept of script_encoding and
> internal_encoding that is used both in the engine and in mbstring.
>
> Currently internal_encoding isn't checked by htmlspecialchars. If you
> pass it '' it checks script_encoding and default_charset which is a bit
> odd since neither directly relate to the encoding of the internal data
> you are feeding to it. So maybe a way to tackle this is to use the
> mbstring internal encoding when it is set as the htmlspecialchars
> default when it is called without an encoding arg.
That's why I would prefer to use an existing setting and clearly
document it instead of creating a new ini settings with a totally
different impact than the existing ones. Not sure which one would fit
best tho'.
Reading these last two paragraphs gave me a headache and I did not
know anymore which encoding we were talking about ;-)
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org