I also got this error. I use lib version 1.5.
I to debug your code and found an inaccuracy in one regular expression.
You have inaccuracy in the method "parse_charset" in this row (1231)
$success = preg_match('/charset=(.+)/', $fullvalue, $matches);
Add to your pattern modifier "i", because if the text has html tags in a different register, the encoding is not determined correctly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also got this error. I use lib version 1.5.
I to debug your code and found an inaccuracy in one regular expression.
You have inaccuracy in the method "parse_charset" in this row (1231)
$success = preg_match('/charset=(.+)/', $fullvalue, $matches);
Add to your pattern modifier "i", because if the text has html tags in a different register, the encoding is not determined correctly.
This is already fixed in master.