PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Search term encoding problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search term encoding problem

    Hi there,

    We've been using zoom for a while. I just noticed a problem that I think was not there before.
    Our website content is in German so there are many umlauts.

    When we enter a search with a digraph there is no problem ... e.g. "Folsaeure" will show results for "Folsaeure" and "Folsäure".

    However, when we enter "Folsäure" the search term gets "corrupted" to "Fols%C3%A4ure" and nothing is found. As far as I can tell the encoding is set properly on all the files. (we use the cgi version)

    What am I missing?

    Thanks
    ph

  • #2
    Here is the site ...

    BTW, the site is here: www.infomed.ch

    Any help is appreciated, thanks!
    ph

    Comment


    • #3
      It seems like the result is returning OK from the CGI directly (note that it doesn't show up quite right because the template HTML doesn't specify UTF-8 charset, but if you change your browser encoding to UTF-8, it shows up correctly):
      http://www.infomed.ch/cgi-bin/search.cgi?zoom_query=Folsäure

      While the PHP script (infomed_search.php) that you are using to include the CGI output is re-encoding the parameter:
      http://www.infomed.ch/infomed_search.php?zoom_query=Folsäure

      If you are using the virtual() command already and doing something like described here, then your PHP might be configured to automatically encoding the parameters. Try adding a call to rawurldecode() like this:

      <?php
      $QSTRING = rawurldecode($_SERVER['QUERY_STRING']);
      virtual("/cgi-bin/search.cgi".'?'.$QSTRING);
      ?>
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        Thank you Ray,

        The rawurlencode helped.
        Our hosting platform does not support virtual(), we had to replace it w/ :
        echo file_get_contents('http://infomed.ch/cgi-bin/search.cgi?'.$QSTRING);

        Everythings seems fine now though.

        Thanks again

        Comment

        Working...
        X