Alex Romayev wrote:

>--- Vadim Gritsenko <[EMAIL PROTECTED]>
>wrote:
>  
>
>>Alex Romayev wrote:
>>
>>    
>>
>>>--- Vadim Gritsenko <[EMAIL PROTECTED]>
>>>wrote:
>>>
...

>>>Good point, I may have a problem in another stylesheet
>>>
>>>(part of the pipeline that responds to the url in
>>>question):
>>>
>>>This parameter is set by the href:
>>><xsl:param name="city"/>
>>>
>>>This should match and does it correctly when 'Delhi'
>>>
>>>is passed, but does not match when I pass 'Дели':
>>>
>>><xsl:apply-templates select="//city[name=$city]/>
>>>
>>>      
>>>
>>Check what encoding is used to decode URL. It should
>>be container 
>>encoding, but you need UTF-8.
>>    
>>
>
>I'm using tomcat4.0.4, do you know how to change it of
>the top of your head?
>

I've not played with encoding of the URL itself, but about request 
parameters see below...


>>PS In any case, non US-ASCII symbols in URL is not a
>>good idea.
>>    
>>
>
>What would be an alternative?  Basically, I need to
>search agains an XML file, which has city as one of
>the elements, and return all records related to the
>sity.  On the page, there is a list of 'favourite
>city' links.
>
>Also, I'm about to try recording information using
>Cocoon, so I haven't tried to use forms yet, but
>wouldn't I run into the same problem? 
>

Ok, UTF symbols should be fine in the forms (GET or POST) if you to:

(1) Serialize HTML form as UTF-8 (or any other encoding), and (2) set 
request encoding: request.setEncoding("UTF-8") (or any other encoding, 
same as in (1)) *before* any access to the request parameters. This can 
be done from an action.

After that, request.getParameter() should work Ok, and if you to get 
request parameter in the sitemap and pass it to the XSLT, it also should 
work ok.


BTW, this was already answered today.


Vadim


>>Vadim
>>
>>    
>>
>>>-Alex
>>>
>>>      
>>>
...


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to