<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Forum posts to 'Site Builders'</title>
		<link>http://www.silverstripe.com/site-builders-forum/</link>
		

		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=223665</link>
			<description>Thanks for your patch and ideas, Jim! The problem is that we'd break special character searches in all other (unescaped) fields like &quot;Title&quot;. There's two existing tickets with partial patches for the problem, we need somebody to write unit tests for the existing functionality before we can proceed with making the searchform i18n-compatible. Shouldn't be too hard, the groundwork is done in the patch. Anyone keen? &lt;br /&gt;&lt;br /&gt;http://open.silverstripe.com/ticket/2267&lt;br /&gt;http://open.silverstripe.com/ticket/2363&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Mon, 10 Nov 2008 04:43:27 +1300</pubDate>
			<author>Ingo Schommer</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=223665</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut - Solution</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=223598</link>
			<description>Any solution by now?&lt;br /&gt;&lt;br /&gt;Generally the search works fine. &lt;br /&gt;With umlaute the previously described &quot;no results&quot; occurs.&lt;br /&gt;However, when you search for the word &quot;möchten&quot; but type &quot;m&amp;amp;ouml;chten&quot; the search does get the results that contain the word.&lt;br /&gt;&lt;br /&gt;I wonder how the data is stored in the database and if the query parameters need to convert characters to html entities before executing the query and also to convert back to correct HTML to get the umlaute issue solved?&lt;br /&gt;&lt;br /&gt;Hint: I'm running SS 2.2.3&lt;br /&gt;&lt;br /&gt;Executing the sql query &quot;select id, content from SiteTree limit 10;&quot; from shell (not phpMyAdmin) I get confirmed what was written before: the database contains plain HTML code:&lt;br /&gt;&amp;lt;h4&amp;gt;Pflege ist Dienstleistung, &amp;lt;/h4&amp;gt; &amp;lt;p&amp;gt;&amp;amp;ouml;de ist langweilig&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;So I would need to convert the search term using htmlentities() before passing it to the query.&lt;br /&gt;&lt;br /&gt;Here is what I did (and it's working):&lt;br /&gt;changed line 76 in sapphire/search/SearchForm.php from&lt;br /&gt;&lt;br /&gt;75	public function getResults($numPerPage = 10){&lt;br /&gt;76	 	$keywords = $_REQUEST['Search'];&lt;br /&gt;&lt;br /&gt;into &lt;br /&gt;&lt;br /&gt;75	public function getResults($numPerPage = 10){&lt;br /&gt;76	 	$keywords = htmlentities($_REQUEST['Search'], ENT_QUOTES, 'UTF-8');&lt;br /&gt;&lt;br /&gt;For the results I used the following in Page_Results.ss template:&lt;br /&gt;			&amp;lt;!-- do some decoding here to display results with umlaute etc. correctly --&amp;gt;&lt;br /&gt;				&amp;lt;p&amp;gt;$Content.LimitWordCount&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Mon, 10 Nov 2008 01:02:00 +1300</pubDate>
			<author>Kolja Hanke</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=223598</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=125393</link>
			<description>I've got the same problem, so what can I do?&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Sun, 20 Jul 2008 05:44:00 +1200</pubDate>
			<author> </author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=125393</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=109075</link>
			<description>Same problem, also by a searches for words with Umlaute fail. &lt;br /&gt;&lt;br /&gt;How can I get this work?&lt;br /&gt;&lt;br /&gt;Version 2.2.2&lt;br /&gt;&lt;br /&gt;Help please!&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Tue, 01 Jul 2008 15:07:58 +1200</pubDate>
			<author> </author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=109075</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=83829</link>
			<description>No no, content is stored escaped (with html_entities I think)!&lt;br /&gt;&lt;br /&gt;Example: [code]ist immer ein Kompromi&amp;amp;szlig; aus Funktionalit&amp;amp;auml;t, Wirtschaftlichkeit und Sicherheit.[/code]&lt;br /&gt;&lt;br /&gt;I started to work with 2.2.0 and updated last week to version 2.2.2!&lt;br /&gt;&lt;br /&gt;What can I do now?&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Thu, 05 Jun 2008 17:28:14 +1200</pubDate>
			<author>robert Koch</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=83829</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=83390</link>
			<description>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).&lt;br /&gt;&lt;br /&gt;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? (-&amp;gt; http://pastie.caboo.se)&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Thu, 05 Jun 2008 09:47:56 +1200</pubDate>
			<author>Ingo Schommer</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=83390</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=83316</link>
			<description>Oke,&lt;br /&gt;if I use [code]$Content.LimitWordCount[/code] instead of [code]$Content.LimitWordCountXML[/code] I get the correct Umlaute.&lt;br /&gt;&lt;br /&gt;But in the database Content is stored escaped! Is this right?&lt;br /&gt;&lt;br /&gt;...searches for words with Umlaute fail. How can I get this work?&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Thu, 05 Jun 2008 07:43:34 +1200</pubDate>
			<author>robert Koch</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=83316</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=75482</link>
			<description>so you've followed our search tutorial? http://doc.silverstripe.com/doku.php?id=tutorial:4-site-search&lt;br /&gt;&lt;br /&gt;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?&lt;br /&gt;&lt;br /&gt;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.&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Mon, 19 May 2008 22:18:26 +1200</pubDate>
			<author>Ingo Schommer</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=75482</guid>
		</item>
		
		<item>
			<title>Re: Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=74542</link>
			<description>same problem, also by a sent newsletter - thanks for help&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Sat, 17 May 2008 21:07:43 +1200</pubDate>
			<author>Ralf Giese</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109?showPost=74542</guid>
		</item>
		
		<item>
			<title>Site Search - German Site - Problem with Umlaut</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/74109</link>
			<description>Hello,&lt;br /&gt;I'm building a German site - in German we have &quot;Umlaute&quot; (special signs) such as &quot;ä ö ü Ä Ö Ü ß&quot;.&lt;br /&gt;&lt;br /&gt;I want to integrate a Site Search. I followed the intstructions on the Tutorial and implemented the search.&lt;br /&gt;&lt;br /&gt;Now I have the problem, that the Umlaut &quot;ä&quot;, written as entity &quot;&amp;amp;auml;&quot; in the content gets re-escaped to &amp;amp;amp;auml; when the search results are displayed - how can I overcome this problem that all ampersands (still those in entities too) get &quot;escaped&quot;?!&lt;br /&gt;&lt;br /&gt;Can anyone please help me?!&lt;br&gt;&lt;br&gt;Posted to: Site Search - German Site - Problem with Umlaut</description>
			<pubDate>Fri, 16 May 2008 20:38:10 +1200</pubDate>
			<author>robert Koch</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/74109</guid>
		</item>
		

	</channel>
</rss>
