• I have a Vietnamese website. When using this plugin with auto generated meta description, I receive result like this:

    Transcend JetFlash Recovery Tool là ph?n m?m chuyên d?ng dùng ?? kh?i ph?c nh?ng d? li?u ?? m?t c?a th? nh?. Ph?n m?m này do h?ng Trancend phát hành, ?ay l

    After looking into the code of the plugin, I found this (inc/wpseo-functions.php):

    ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : utf8_encode( substr( strip_shortcodes( strip_tags( utf8_decode( $r->post_content ) ) ), 0, 155 ) )

    This is not correct for some language, including Vietnamese (an utf-8 one). Actually, Vietnamese works with simpler code:

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

    e.g. without encoding, decoding functions.

    Hope this fix will be included in new version.

    https://www.ads-software.com/extend/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • Thread Starter Anh Tran

    (@rilwis)

    Oops, my fix above doesn’t work, too.

    I have to use wp_trim_words to get a part of post content. But it count words, not characters.

    Still looking for a better solution.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] [Bug Report] Unicode encoding in meta description’ is closed to new replies.