Hi Sara, On Tue, Apr 12, 2016 at 7:54 AM, Sara Golemon <poll...@php.net> wrote: > With a light push from Stas, I've decided to go ahead and put up > IntlCharsetDetector for discussion. > https://wiki.php.net/rfc/intl.charset-detector > > I'm still not personally convinced this API is trustworthy enough, but > it's worth a formal discussion period at least.
Things might have been changed, but as you've mentioned encoding detection is unstable and ICU is poor compared to mbstring's detection at least for Japanese encodings. Developers should not rely on encoding detector, but they should validate encoding. Problem is there are cases that developers cannot determine used encoding... If we are going to have this API, it would be better to validate string with detected encoding by default and disable encoding validation optionally. There are cases that developers have to deal with broken string data on occasion. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php