Course summary display a wrong character in non-latin characters

Issue #166 open
Info 3bits created an issue

Using the text-overflow: ellipsis in the coursebox with non-latin characters, a code 65533 is added between the text and the ellipsis.

A possible solution would be to use the "old-style" and cut the course title and add " ..." at the end.

Comments (7)

  1. Info 3bits reporter

    Found the issue in: https://bitbucket.org/covuni/moodle-theme_bcu/src/b5e1f4c3f0a22ca642c299e9f74f88cc7fd9924f/renderers.php?at=master&fileviewer=file-view-default#renderers.php-1152

    $truncsum = strlen($summs) > 70 ? substr($summs, 0, 70)."..." : $summs;

    I thought at the beginning that could be an encoding problem with "..." but if you remove the string still fails.

    So the problem is when you truncate the string with non-latin characters.

    I continue investigating.

  2. Alexander Goryntsev

    I've studied HTML code of the page and I see that text strings are truncated on the server side. It was the first solution (old style as you wrote) to the problem as this issue began. For a couple of my much smaller projects I used 'text-overflow: ellipsis;' declaration to truncate a text string on the client side. Works fine with Cyrillic. Maybe give it another try?

  3. Log in to comment