You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Wendell Piez <wa...@mulberrytech.com> on 2008/04/08 00:08:56 UTC
Trouble with non-ASCII URIs
Hi,
I'm having trouble passing non-URI characters
into XSLT as parameters. A string such as
A%CF%80%CF%8C%CE%BB%CE%BB%CF%89%CE%BD appears
(when passed in as a parameter mapped from an
incoming URI) to the XSLT processor as
AÏ?Ï?λλÏ?ν (that is, as a nonsense string that
probably won't make it through the mailer). When
I use this value in my document instead of the
escaped URI string I expect, things work, but
this is neither legible (while the unescaped form
of the value coming in) nor a properly escaped
string I am able to generate. I have the problem
using both Xalan and Saxon 9 under XSLT 2.0. I'm
running Cocoon 2.1.10, and have my serializers
set to write UTF-8, which they are doing. It's
values coming in as parameters that are getting mashed.
I've got a minimal XML file and XSLT instance to
demonstrate this, with a mini-sitemap. What's the
easiest way to post this for someone to look at?
I'm sure I'm missing something fairly basic.
Thanks,
Wendell
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Trouble with non-ASCII URIs
Posted by Wendell Piez <wa...@mulberrytech.com>.
Thanks Vadim, I'll take a look at these --
Cheers,
Wendell
At 07:19 PM 4/7/2008, you wrote:
>You have to specify how do you want request parameters decoded:
>
>http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String)
>
>There are several ways of doing this in Cocoon, including:
>
> http://cocoon.apache.org/2.2/1366_1_1.html (3. Decoding incoming
>requests)
> http://wiki.apache.org/cocoon/RequestParameterEncoding (Older
>documentation)
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Trouble with non-ASCII URIs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
On Apr 7, 2008, at 6:08 PM, Wendell Piez wrote:
> Hi,
>
> I'm having trouble passing non-URI characters into XSLT as
> parameters. A string such as A%CF%80%CF%8C%CE%BB%CE%BB%CF%89%CE%BD
> appears (when passed in as a parameter mapped from an incoming URI)
> to the XSLT processor as AÏ?Ï?λλÏ?ν (that is, as a nonsense
> string that probably won't make it through the mailer). When I use
> this value in my document instead of the escaped URI string I
> expect, things work, but this is neither legible (while the
> unescaped form of the value coming in) nor a properly escaped string
> I am able to generate. I have the problem using both Xalan and Saxon
> 9 under XSLT 2.0. I'm running Cocoon 2.1.10, and have my serializers
> set to write UTF-8, which they are doing. It's values coming in as
> parameters that are getting mashed.
>
> I've got a minimal XML file and XSLT instance to demonstrate this,
> with a mini-sitemap. What's the easiest way to post this for someone
> to look at? I'm sure I'm missing something fairly basic.
You have to specify how do you want request parameters decoded:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String)
There are several ways of doing this in Cocoon, including:
http://cocoon.apache.org/2.2/1366_1_1.html (3. Decoding incoming
requests)
http://wiki.apache.org/cocoon/RequestParameterEncoding (Older
documentation)
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org