WordPress.org

Ready to get started?Download WordPress

Forums

BUG: apply_filters function Mangled Japanese (6 posts)

  1. kmlawson
    Member
    Posted 10 years ago #

    When posting Japanese comments (and presumably anything with 2-byte languages like Chinese, Korean, and Japanese) the "apply_filters" function which is called from the "comment_text()" function in the template_functions.php file produces totally mangled Japanese text.
    You have to allow for the fact that two byte characters can be coming into your functions and not slice and chop strings apart on the assumption that they are single byte characters.
    TEMPORARY SOLUTION FOR OTHERS EXPERIENCING MANGLED COMMENTS IN OTHER LANGUAGES:
    In the template_functions.php file in the wp-includes folder, comment out the following line in the comment_text() function like this:
    /* $comment_text = apply_filters('comment_text', $comment_text); */
    I don't know what apply_filters does but it seems to work without it.

  2. Thanks kmlawson for this. I was having the problem in my Japanes blog.
    But this also disables auto-blank function. I wonder if there is better way to do this?

  3. michelv
    Member
    Posted 10 years ago #

    Better solution: go to Options > General Blog Settings. There, deactivate the option use_htmltrans.

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    same problem discussed and solved...
    http://wordpress.org/support/3/1663
    and deactivating htmltrans won't help.

  5. For some reason turning use_htmltrans off didn't work for me either.
    I tried the second solution in this thread:
    http://wordpress.org/support/3/1663
    It worked! Thanks, Anonymous :0)

  6. michelv
    Member
    Posted 10 years ago #

    OK, just so we can find what the problem is and how to solve it, can you tell us with charset is the blog in when the text is mangled?
    Also, just in the interest of testing, can you comment on some post on http://fresh.intraordinary.com/ in Japanese or any other language? That test blog's on UTF-8.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.