All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Weird character encoding

owe 2 Jan 2012 11:55 problem, complete

Thanks for a great add-on!

I have a problem with character encoding though. Everything on my site is utf-8 and my custom search engine is set to utf-8 as well. However, my results look something like this "...sjon � Medieråd..." Google inserts these "·" and they show up like this "�". The really weird thing though is that if i force the character encoding to latin-1 on the entire page, "·" shows up correctly. The weird thing about this behavior is that there are norwegian letters in there as well (æ, ø, å), correctly encoded as utf-8, so if i do change the character encoding to latin-1, they don't show up correctly.

How can it be that i receive a string of letters where some have one encoding and some another?

Replies

  1. Low 2 Jan 2012 12:07

    Hi! I think you need to fiddle a bit with the oe="" and ie="" parameters. Check out the Google docs on internationalization for this.

    If you can email me your cx code, I can take a look myself. Send it to hi at gotolow dot com.

  2. owe 2 Jan 2012 14:00

    Hi, I've sent you the cx code.

  3. Low 2 Jan 2012 14:44

    Hi!

    Can you try the following:

    * Open up mod.low_googlesearch.php in a text editor
    * Look up line #733, which should say return html_entity_decode($str);
    * Replace that line with this:

    return $str;


    * Save file and try again.

  4. owe 2 Jan 2012 16:42

    That seemed to work, except it was line #722 ;-)

  5. Low 2 Jan 2012 20:38

    Cool. Glad it worked out.