Bug #15270

Bug in class.t3lib_cs.php - substr() function

Added by Eloy Lafuente almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-12-10
Due date:
% Done:

0%

TYPO3 Version:
3.8.1
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

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');

should say:

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)

History

#1 Updated by Sebastian Kurfuerst almost 12 years ago

Hi masi,
it would be great if you could check this.

Thanks and Greets, Sebastian

#2 Updated by Sebastian Kurfuerst almost 12 years ago

Hi Karsten,

it would be great if you might have a look on this issue as well.

Greets, Sebastian

#3 Updated by Martin Kutschker almost 12 years ago

Eloy is right :-(

I'll fix it.

#4 Updated by Martin Kutschker almost 12 years ago

Fixed in CVS (HEAD).

Also available in: Atom PDF