Title: Encoding problems
Last modified: August 21, 2016

---

# Encoding problems

 *  Resolved [Martin Hynek](https://wordpress.org/support/users/martascz/)
 * (@martascz)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/)
 * Hi, found few topics about problems with encoding… But they’re pretty old..
 * Wanna ask what to do, ‘cos i have problems with Relevanssi and HTML encoding 
   of foreign language characters.. for example czech ones and many characters same
   in other languages… + even special characters..
 * for example – is found by Relevanssi like ndash,
    á like aacute…
 * seems that Relevanssi does not follow & prefix and ; ..
 * any tip what should i do?
 * [http://www.thesauruslex.com/typo/eng/enghtml.htm#cz](http://www.thesauruslex.com/typo/eng/enghtml.htm#cz)
 * Using latest Relevanssi…
 * [https://wordpress.org/plugins/relevanssi/](https://wordpress.org/plugins/relevanssi/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905382)
 * Relevanssi is fully UTF-8 compatible. I tried to see if I could reproduce the
   error, but actually WP doesn’t even let me use & aacute ; – it’s automatically
   converted to á, which Relevanssi can handle just fine.
 * What kind of encoding is your site using? Where are the characters being encoded
   with the entities? Relevanssi doesn’t do that, and would prefer to get unencoded
   characters.
 *  Thread Starter [Martin Hynek](https://wordpress.org/support/users/martascz/)
 * (@martascz)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905391)
 * I can see it on **Most common words in the index**… And then in stopwords…
 * Yeah characters are converted, but when index is created it seems that during
   the indexing process Relevanssi access pages on source code level – if i can 
   say it like that..
 * Relevanssi splits words which containts these characters… like on [screenshot](http://pub.martinhynek.com/relevanssi.png)..
 * Characters are inside posts..
 * db tables are utf8_czech_ci collation, wordpress uses utf-8 charset ..
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905452)
 * There’s something unusual going on in your site – I don’t see that happening 
   on my sites, and can’t reproduce the error.
 * When indexing, Relevanssi reads posts with get_post(), nothing weirder than that,
   and doesn’t convert anything by itself – so those encoded entities are what Relevanssi
   gets.
 * Try this:
 *     ```
       add_filter('relevanssi_post_content', 'rlv_fix_encoding');
       function rlv_fix_encoding($content) {
           return html_entity_decode($content);
       }
       ```
   
 * Add this to functions.php and reindex. Does that help?
 *  Thread Starter [Martin Hynek](https://wordpress.org/support/users/martascz/)
 * (@martascz)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905459)
 * It seems that it** fixed the problems 🙂 Thx a lot 🙂**
 * Can i have other question when it shows result of search, template is broken..
   every time it looks like different and not right… I found some topic with this
   problem, but can’t find it now… Its probably caused by template or some strange
   interpretation of result…
 * Any tip with this?
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905479)
 * Which theme are you using? What kind of problems your template has? Does it have
   the same problems without Relevanssi?
 *  Thread Starter [Martin Hynek](https://wordpress.org/support/users/martascz/)
 * (@martascz)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905500)
 * Well i’m using [Grandcollege ](http://themes.goodlayers.com/?theme=grandcollege)–
   premium theme.. No other problems with template.. Without Relevanssi its all 
   ok, no problems…
 * With Relevanssi it seems that somehow Relevanssi brokes footer and merge styles
   with it..
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905522)
 * Does the problem go away if you disable highlighting in search results? Modernize
   theme has a similar problem: the theme truncates the excerpt and if Relevanssi
   has highlights in the excerpt, a HTML tag may get truncated, causing problems.
 *  Thread Starter [Martin Hynek](https://wordpress.org/support/users/martascz/)
 * (@martascz)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905524)
 * Well yeah, you’re correct, same problem with highlighting… Thx a lot for help
   🙂
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905535)
 * Modernize has a method to adjust the length of the excerpt – set it to very long,
   and there’s no problem, as Relevanssi will then set the real length of the excerpt
   and Modernize then won’t cut in the middle of a HTML tag. Perhaps your theme 
   has something similar as well, so you don’t have to remove highlights completely.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Encoding problems’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

## Tags

 * [character encoding](https://wordpress.org/support/topic-tag/character-encoding/)

 * 9 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/encoding-problems-4/#post-4905535)
 * Status: resolved