ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

German Language search problem

March 07, 2011 12:43pm

Subscribe [4]
  • #1 / Mar 07, 2011 12:43pm

    Design ID

    9 posts

    I’m using EE 2.1.0 for a German Language site.

    Both the site templates and the EE Config file are set to UTF-8 charset. All accented characters are displaying correctly on the site and in the back end of EE.

    I have a simple search form on the site that works fine as long as you search for words that do not have any accents in them.

    However if you search for any word containing an accented character, no results are returned.

    I have tried searching for words I KNOW are in the content and are in searchable fields, and I have tried copying and pasting accented words from the content into the search box. No results!

    I can search for the same accented words in the back end of the CMS (in Edit Channel Entries, and using the Search Entries facility) - and the correct entries are found, so it looks like EE recognizes the accents, but just can’t match them from the search form.

    Accented characters are showing up correctly in the search results page on the site as well (in titles and summaries), so I’m at a complete loss to know where to look for a solution.

    Any help (urgently please!) greatly appreciated.

    Mark.

  • #2 / Mar 07, 2011 4:18pm

    Davor

    114 posts

    Hi Design ID
    Check my topic about my issue with croatian accents, you could try my temporary solution posted at the bottom of the topic.
    http://ellislab.com/forums/viewthread/174287/

    Did you tried searching for that words in plain version with no accents?

  • #3 / Mar 07, 2011 6:01pm

    Ingmar

    29245 posts

    Thanks, Davor. I, too, was going to suggest searching for words with the umlaut removed: does a search for, e.g. “Borse” bring up “Börse”? Do you know what MySQL collation you are using?

  • #4 / Mar 08, 2011 10:06am

    Design ID

    9 posts

    Hi Davor,

    Searching for “Schluckstorungen” returns no results because the actual content uses accents i.e. “Schluckstörungen”.

    Hi Ingmar,

    The MySQL details are as follows:
    PHP: 5.2.13
    MySQL: 5.0.91-community
    MySQL collation: utf8_general_ci

    Would changing the collation make a difference? There does not seem to be a German collation option.

    Also, would changing the collation alter my content at all? In other words, if changing it does not fix the problem, can I go back without altering the stored content?

    Thanks?

  • #5 / Mar 08, 2011 3:35pm

    Barry Cogan

    291 posts

    Hi Davor,

    I have tried to replicate this issue. I was unsuccessful. When i pasted in Schluckstörungen into one of my channel entries simple search found it. this was done using the current version 2.1.3. 

    The fact it is saving into the database fine and CP search works fine leads me to thinking that there is something with the simple search tags.  Could you please paste in the template code you use for the search on your site?

    As for changing the collation, I would not personally do it.  This is not a database problem as proven by the CP searching fine 😊

    If you do decide to change collation: be sure to get a COMPLETE database backup. any mistakes inside a database are final. There are no undos.

    Best regards,
    Barry

  • #6 / Mar 09, 2011 6:50am

    Design ID

    9 posts

    Here is the search code I am using:

    {exp:search:simple_form channel=" list of channels separated by pipes " result_page="search"}
    
        <input type="image" src="{site_url}/images/layout/go-button.gif" alt="Submit button" />
    
        <input name="keywords" type="text" id="keywords" value="" size="20" maxlength="100" />
    
        <label for="keywords">Suche</label>
    
    {/exp:search:simple_form}

    Mark.

  • #7 / Mar 09, 2011 1:10pm

    Sue Crocker

    26054 posts

    Hi, Design ID. I’m sorry we didn’t ask you what you had in your search template. Here’s an article you might find helpful:

    http://eehowto.com/index.php/howto/articles/simple-search-finding-content

    You’re missing a search_in=“everywhere” setting.. Does that help with your problem?

  • #8 / Mar 24, 2011 8:41am

    Design ID

    9 posts

    You’re missing a search_in=“everywhere” setting.. Does that help with your problem?

    Sue, you’re a lifesaver! That fixed it.

    Thank you so much.

    Mark.

  • #9 / Mar 24, 2011 4:39pm

    Sue Crocker

    26054 posts

    Hi, Mark. Glad that fixed things for you… Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases