Bug in class.t3lib_cs.php - substr() function
I was playing with your class.t3lib_cs.php - substr() function when I've seen that ALWAYS, when using mb_substr() you force it to 'utf-8', ignoring completely the $charset parameter.
In my opinion, the line:
else return mb_substr($string,$start,$len,'utf-8');
else return mb_substr($string,$start,$len,$charset);
Hope it help, ciao :-)
Just to say that I'm a Moodle developer and we are going to use such library intensively in our migration to Unicode. Thanks for it!! B-)
(issue imported from #M2020)