Support » Plugin: Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] Issues with accents : how I fixed it

  • Hello,

    Adding to the issue I had beetween my local and online installations with Yarpp which was due to a conflict with the Podcasting plugin, I had another issue.

    Localy, the keywords inserted in the yarpp_keywords_cache table were fine, even with accentuated characters in the keywords.

    Online, I realized, looking at the table, that keywords were cut just before an accentuated character, hence the keyword “vidéo” was stored as “v” …

    Tracking the outputs in the different functions of the yarpp plugin, I discovered that I had to replace line 11 of keywords.php :

    $wordlist = mb_split('\s*\W+\s*', mb_strtolower($source))

    by

    $wordlist = mb_split('\s*\W+\s*', mb_strtolower($source , get_option('blog_charset')));

    Hence specifying the encoding. Weird because I thought on the moment ‘mb_regex_encoding(get_option(‘blog_charset’))’ was doing the encoding stuff and it looks like it works on my local WP and not online.

    I noticed my local installation on XAMPP is PHP 5.3 powered and online it’s still 5.2.10.

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] Issues with accents : how I fixed it’ is closed to new replies.