@anonymous-piwik-user opened this Issue on November 10th 2011

This patch fixes a bug in the 'truncate' function (core function) where PHP function 'substr' have been working incorrectly with the 'utf-8' Cyrillic encoding.

That was causing the '' symbol appearing in the end of page titles being cut. For example, we found the bug in 'Visitors' > 'Visitor Log' section.

So the patch replaces the 'substr' fucntion with the 'mb_substr' and 'utf-8' and the bug then goes away.

@anonymous-piwik-user commented on November 10th 2011

Attachment:
truncate.patch

@anonymous-piwik-user commented on November 11th 2011

Attachment: encode patch for mbstrings
truncate.2.patch

@anonymous-piwik-user commented on November 11th 2011
@robocoder commented on November 10th 2011 Contributor

thanks; the only change to the patch would be to handle case where mbstring extension may not be present

@robocoder commented on November 10th 2011 Contributor

(In [5427]) fixes #2769

@mattab commented on November 11th 2011 Member

codax thanks for the patch, and vipsoft thanks for super fast commit ;)

@robocoder commented on November 13th 2011 Contributor

(In [5430]) refs #2769 - revert this patch

@robocoder commented on November 13th 2011 Contributor

(In [5431]) fixes #2769 plus refactoring

@mattab commented on November 13th 2011 Member

codax, do you mind testing the new versions of the modified files and confirm it is working for your encoded strings?

@anonymous-piwik-user commented on November 14th 2011

Replying to matt:

codax, do you mind testing the new versions of the modified files and confirm it is working for your encoded strings?

Thanks for the feedback. We have tested things and now it's working fine.

This Issue was closed on November 14th 2011
Powered by GitHub Issue Mirror