WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Greg's Comment Length Limiter] Problem with diacritic

[Resolved] [Plugin: Greg's Comment Length Limiter] Problem with diacritic

  • michal.lohnisky

    @michallohnisky

    Hello,

    my language (Czech) use letters with diacritic (“ěščřžýáíé …”).
    In utf-8 strlen(‘ě’) == 2.

    Problem:
    upper limit is “6”
    comment box contains “abcědef”
    result would be “abcěde”
    but in real is “abcěd”

    Solution:
    in function comment_trimmer add before 1st line
    $length += (strlen($totrim) - mb_strlen($totrim, get_option('blog_charset')));

    Michal

    http://wordpress.org/extend/plugins/gregs-comment-length-limiter/

Viewing 1 replies (of 1 total)
  • Plugin Contributor gregmulhauser

    @gregmulhauser

    Hi Michal,

    Many thanks for the catch! I’ve updated that section of code with multi-byte string functions throughout. Version 1.5 has just been uploaded and should be available shortly.

    All the best,
    Greg

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Greg's Comment Length Limiter] Problem with diacritic’ is closed to new replies.