cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <jheini...@virbus.de>
Subject Re: URL encoding for request
Date Thu, 23 Oct 2003 07:41:01 GMT
Seems to be more weird than it should be. In your database there is 
"Gießharz" I think and not the URL encoded form of it. Furthermore the 
string is correctly in your pipelines, so everything should work. But 
some representations of this string are not correct, so that they don't 
match. One of them is the search result HTML ("Your search for 
"GieEUR?harz" has no hits."). I guess you have to debug around a bit 
where the string is "Gießharz" and where not. It should always be in 
this representation internally. What about encoding (ISO-8859-1 vs. 
UTF-8)? How does your searchPageResult pipeline look like?

Joerg

On 23.10.2003 09:11, Fleischer Roman wrote:

> Hello Joerg,
> 
> thank you for the quick answer. I will tell my case, resp. show my problem.
> I use a search form with the input field searchString. The form action is
> OCIprod (a matcher in the cocoon sitemap).
> When i look to the log-files the request is URL encoded
> (http://127.0.0.1/cocoon/OCIprod?searchString=Gie%C3%9Fharz&searchMLFB=&sear
> c....)
>  
> The OCI prod matcher looks like this:
> <map:match pattern="OCIprod">
> <map:generate type="request"/>
> <map:transform type="xslt" src="product.xsl"/>
> <map:transform type="cinclude"/>
> <map:transform type="encodeURL"/>
> <map:serialize type="html"/>
> </map:match>
> 
> In the stylesheet product.xsl i use a cinclude to show the search result
> <xsl:param name="searchString"
> select="request:requestParameters/request:parameter[@name='searchString']/re
> quest:value/text()"/>
> ...
> <xsl:if test="$search='result'">
> <cinclude:include
> src="cocoon:/searchPageResult?lang={$lang}&amp;searchString={$searchString}"
> />				
> </xsl:if> 
> 
> Now the param $searchString has the value "Gießharz" instead of
> "Gie%C3%9Fharz" and can not be found in the database. I get an error on the
> searchPage result page like "Your search for "GieEUR?harz" has no hits. If I
> call the searchPageResult direct in the browser with URL encoded
> searchString everything works.
> 
> What is my error?
> Thanks
> 
> 
> -----Original Message-----
> From: Joerg Heinicke [mailto:jheinicke@virbus.de]
> Sent: Donnerstag, 23. Oktober 2003 01:19
> To: users@cocoon.apache.org
> Subject: Re: URL encoding for request
> 
> 
> Hello Roman,
> 
> for the request generator the decoding is okay. It gives the request 
> params in their string representation in an XML structure. It knows 
> nothing about an URL encoded string. (%C3%9F is URl encoded, not UTF 
> encoded!!)
> 
> Maybe it's better to tell us your use case. If you transform the output 
> of the request generator back into a HTML page with links, the @href 
> will be URL encoded again - at least that should be done by the XML 
> serializer.
> 
> Joerg
> 
> On 21.10.2003 14:10, Fleischer Roman wrote:
> 
> 
>>Hello,
>>
>>i have some problems with URL encoding. 
>>I call a matcher in this form:
>>
> 
> http://127.0.0.1/cocoon/OCIprod?searchString=Gie%C3%9Fharz&searchMLFB=&searc
> 
>>h=result...
>>(%C3%9F is the german "ss")
>>
>>In the matcher i call a request generator and a xml-serializer.
>>The result is:
>>...
>><h:requestParameters>
>>	<h:parameter name="searchString">
>>  		<h:value>Gießharz</h:value> 
>>  	</h:parameter>
>>	<h:parameter name="search">
>>  		<h:value>result</h:value>
>>...
>>
>>Why is the parameter searchString transformed? How can i aviod the
>>transforming? I need this param UTF-8 encoded (like in the  calling URL)
>>
>>Any idea?
>>Thanks...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message