hi Rasmus, On Mon, Mar 12, 2012 at 9:12 PM, Rasmus Lerdorf <ras...@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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php