hello
for me this is working for searching non-english-characters
<jsp:scriptlet>
String query = "";
if (request.getParameter("query") != null) {
query = request.getParameter("query");
query = info.magnolia.cms.util.RequestFormUtil.getURLParameterDecoded
(request,"query","UTF-8");
}
pageContext.setAttribute("query",query);
</jsp:scriptlet>
<cmsu:simpleSearch query="${query}" var="results" />
cheers tom
Am 27.03.2007 um 16:12 schrieb Stefan Zingmark:
Hi!
I don't understand where to use your code, this is what I have.
It's exactly like the "sampleSearch-template" that comes with
magnolia. The problem was to search for "non-english-characters".
----
<c:if test="${!empty(param.query)}">
<h2>Search result for: <i>${fn:escapeXml(param.query)}</i></h2>
<cmsu:simpleSearch query="${param.query}" var="results"
startLevel="1" />
<c:if test="${empty(results)}">
<p>No results</p>
</c:if>
<c:forEach var="node" items="${results}">
<h3>${node.title}</h3>
<p><cmsu:searchResultSnippet query="${param.query}" page="$
{node}" /></p> </c:forEach>
</c:if>
-------
Thanks!
hi
this should work:
String query = "";
if (request.getParameter("query") != null) {
query = request.getParameter("query");
query =
info.magnolia.cms.util.RequestFormUtil.getURLParameterDecoded
(request,"query","UTF-8");
}
cheers tom
Am 27.03.2007 um 15:28 schrieb Stefan Zingmark:
Hi all!
I have a problem with the simpleSearch tag when I search for "non-
english-characters". The simpleSearch tag does not recognize
these characters and therefore I get no search results. Have
anyone encountered this before? Does anyone have a solution to
this problem? I can get the word in "normal" characters but then
I don't know how to use it in the simpleSearch tag.
<jsp:scriptlet>
String realWord = new String(request.getParameter
("query").getBytes("ISO-8859-1"), "UTF8");
</jsp:scriptlet>
Thanks!
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
--esense GmbH
Tom Wespi
Leonhardsstrasse 38
CH-4051 Basel
0041 61 271 35 01
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
--
esense GmbH
Tom Wespi
Leonhardsstrasse 38
CH-4051 Basel
0041 61 271 35 01
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------