WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] %%excerpt%% doesn't display multibyte characters (6 posts)

  1. wpmubp
    Member
    Posted 1 year ago #

    WordPress version: 3.4.1
    WordPress SEO version: 1.2.7

    I did this:
    I setup the plugin to add meta description based on excerpt.

    I expected the plugin to do this:
    Display excerpt properly no matter what language is used. But it just displays question marks and only support English.

    Instead it did this:
    ??????8?5??????????2??9?2????NPO????????????????????????????????????????????? ????NPO??????????NPO??????????????????????????????NHK??????????4????????N

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. akis
    Member
    Posted 1 year ago #

    You'll have to remove remove utf8_decode() and utf8_encode() from
    /inc/wpseo-functions.php line 156

    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155 ),

  3. wpmubp
    Member
    Posted 1 year ago #

    Thanks akis, it worked. I hope the author fixes the bug.

  4. Jowy92
    Member
    Posted 1 year ago #

    Same probleme !

    Thanks for the fix it works ;)

    Hope the next version will fix that.

  5. Jowy92
    Member
    Posted 1 year ago #

    The 1.2.8.1 don't fix this bug.
    I have to re-fix it.

    Hope the next version will patch that.

  6. Riodan
    Member
    Posted 1 year ago #

    i made this and it worked perfectly for me

    '%%excerpt%%'=> substr($r->post_content,0,300),

    i replaced the 155 to 300 as the language i'm using in my website
    http://www.dallilak.com is a multibyte language so to keep the output nearly the same.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic