You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tomasz Bech <tb...@polbox.com> on 2002/04/02 17:12:49 UTC

XSLT and international characters in parameters

Hi all,
	I found some request about this problem, but no answer.
	Problem is: when form is in utf8, parameters are encoded as utf8. But 
server always wants to treat them as iso-something.
In XSP remedy is:
<xsp-request:get-parameter name="searchtext" form-encoding="UTF-8"/>
                                              ^^^^^^^^^^^^^^^^^^^^^^^

But problem appears when I try to use parameters in xsl (as <xsl:param 
name='searchtext/>). No idea how to set encoding to proper one?

More questions:
2. Why server doesn't understand encoding of request parameters?
3. How to set encoding of request globaly (for all and forever)?
	Thanks,	
		Tomasz


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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: XSLT and international characters in parameters

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Tomasz Bech [mailto:tbech@polbox.com]
> 
> Hi all,
> 	I found some request about this problem, but no answer.
> 	Problem is: when form is in utf8, parameters are encoded as
utf8. But
> server always wants to treat them as iso-something.
> In XSP remedy is:
> <xsp-request:get-parameter name="searchtext" form-encoding="UTF-8"/>
>                                               ^^^^^^^^^^^^^^^^^^^^^^^

Yup.


> But problem appears when I try to use parameters in xsl (as <xsl:param
> name='searchtext/>). No idea how to set encoding to proper one?

Try custom action.

 
> More questions:
> 2. Why server doesn't understand encoding of request parameters?

Sounds like question to your server. Is it tomcat? Try tomcat docs/user
list.


> 3. How to set encoding of request globaly (for all and forever)?

You can change encoding of the JVM if you either change locale of the OS
or provide "-D" parameter on the startup of the JVM (see JDK docs)

Vadim

> 	Thanks,
> 		Tomasz
> 


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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>