Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Morten Skyt

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

7 years, 4 months ago
Stefan van den Dungen Gronovius
Developer

Hi Morten,

Thank you very much for your feedback, that is really appreciated!
I will create an issue for this and we will try to fix this problem as soon a possible.
You can follow this ticket on Github if you like:
https://github.com/codepress/admin-columns-issues/issues/853

7 years, 4 months ago

You must be logged in to reply to this topic.