All Topics
Last character before ellipsis must not be in UTF-8
Hi there,
When a column contains texts that get trimmed, then it seems that the substring-method is not UTF-8-aware. For instance, in Danish, ÆØÅ are quite common in names which works fine. It works fine throughout until the ellipsis kicks in.
Consider this string:
XYZÆ123
If the limit is set to 4 characters, then right now, the code just substr’s, but as Æ actually takes up multiple bytes, the rendered output is:
XYZ�…
Instead of
XYZÆ…
In short, if you switched to using mb_substr instead of plain substr, then this issue should be resolved.
Kind regards,
Morten
You must be logged in to reply to this topic.