The demo data from $arr (chr(0xC6) . ' AE Ligature') is not showing up any errors while runnig your demo. Nor does $arr ('Accented "a" ' . chr(0xE0) . ' in this string').
I am at a loss: should'nt these also yield errors (acoording to you comment in the demo file?
René bakker, Netherlands
R. Bakker - 2019-02-04 00:09:17 - In reply to message 2 from Ray Paseur
After some extensive testing this weekend, I like to share my findings:
- demo page flawlessy in all tested Unix environments
- demo page fails for AE ligature and accented "a" in all tested Windows environments, not reporting any errors in these strings. It turns out that the utf8 class sees them as valid ascii strings.
The PCRE character class :ascii: -used to test for ascii- seems to be in the wrong here ...
Can you aknowlege and may be repair/extand the class?
I would realy like to use your class to clean up some database content as part of a migration.
It uses the $repair (second argument to the constructor) to tell the class to try to repair invalid UTF8 characters. I do not have any way to test on Windows, sorry. This script has highlight_file(__FILE__); so you can copy / paste the code.
My Twitter handle is @RayPaseur and my GMail is Ray.Paseur@
If you can post a link to the demo showing the error, I'll be glad to look into it, thanks.