New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncation should handle UTF-8 (multi-byte encoding) #2769
Comments
Attachment: |
thanks; the only change to the patch would be to handle case where mbstring extension may not be present |
(In [5427]) fixes #2769 |
codax thanks for the patch, and vipsoft thanks for super fast commit ;) |
Attachment: encode patch for mbstrings |
Attachment: |
(In [5430]) refs #2769 - revert this patch |
(In [5431]) fixes #2769 plus refactoring |
codax, do you mind testing the new versions of the modified files and confirm it is working for your encoded strings? |
Replying to matt:
Thanks for the feedback. We have tested things and now it's working fine. |
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.
The text was updated successfully, but these errors were encountered: