Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Site Search - German Site - Problem with Umlaut

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 4533 Views
  • KingBerT
    Avatar
    Community Member
    11 Posts

    Site Search - German Site - Problem with Umlaut Link to this post

    Hello,
    I'm building a German site - in German we have "Umlaute" (special signs) such as "ä ö ü Ä Ö Ü ß".

    I want to integrate a Site Search. I followed the intstructions on the Tutorial and implemented the search.

    Now I have the problem, that the Umlaut "ä", written as entity "ä" in the content gets re-escaped to ä when the search results are displayed - how can I overcome this problem that all ampersands (still those in entities too) get "escaped"?!

    Can anyone please help me?!

  • ericson
    Avatar
    Community Member
    2 Posts

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    same problem, also by a sent newsletter - thanks for help

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    so you've followed our search tutorial? http://doc.silverstripe.com/doku.php?id=tutorial:4-site-search

    it outputs the content summary as $Content.LimitWordCountXML, which triggers Convert::raw2xml(). so far so good, no double htmlentities encoding. can you make sure the content is stored without being escaped into htmlentities?

    as for the newsletter: we need more info, the source of the sent mails is helpful. i suspect you're sending unicode characters in a iso8859-1 (latin1) encoded mail.

  • KingBerT
    Avatar
    Community Member
    11 Posts

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    Oke,
    if I use

    $Content.LimitWordCount

    instead of

    $Content.LimitWordCountXML

    I get the correct Umlaute.

    But in the database Content is stored escaped! Is this right?

    ...searches for words with Umlaute fail. How can I get this work?

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    hm database content is stored in utf8 (so don't be fooled by phpmyadmin giving you garbled output, its html encoding is mostly set to latin1).

    can you try to get the sql-query thats generated (in SearchForm.php), append a COLLATE utf8 statement (see http://dev.mysql.com/doc/refman/5.1/en/charset-collate.html), and execute it manually? if it still doesn't work, can you post the query thats failing here? (-> http://pastie.caboo.se)

  • KingBerT
    Avatar
    Community Member
    11 Posts

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    No no, content is stored escaped (with html_entities I think)!

    Example:

    ist immer ein Kompromiß aus Funktionalität, Wirtschaftlichkeit und Sicherheit.

    I started to work with 2.2.0 and updated last week to version 2.2.2!

    What can I do now?

  • SunPower
    Avatar
    Community Member
    6 Posts

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    Same problem, also by a searches for words with Umlaute fail.

    How can I get this work?

    Version 2.2.2

    Help please!

  • UN
    Avatar
    Community Member
    1 Post

    Re: Site Search - German Site - Problem with Umlaut Link to this post

    I've got the same problem, so what can I do?

    4533 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.