Last character before ellipsis must not be in UTF-8
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:
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:
In short, if you switched to using mb_substr instead of plain substr, then this issue should be resolved.
You must be logged in to reply to this topic.