Shortening titles containing umlauts or other special characters
Hi,
classipress uses the functions
strlen(get_the_title()) >= 45 and substr(get_the_title(), 0, 45)
for shortening the titles on the titles in the ad overview. This works great unless there is an umlaut at the cutt-off point.
A number of languages use umlauts or special characters that are multibyte characters thus the count may cut such a character which results in a display like this:
umlaut.jpg
It would be better to use mb_strlen() and mb_substr() which counts a multibyte character as one and no unwanted cuttings can happen anymore. Then it looks like it shoud
umlaut2.jpg
I was not sure if this should be considered as feature request or troubleshooting. But I think it would be good if the function could be replaced in future versions of classipress to avoid strange characters in the titles of some other languages.