cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibi DONDERA" <tibidond...@hotmail.com>
Subject Re: url & unicode
Date Tue, 29 Jan 2002 16:51:40 GMT
We had the same problem a while ago.

We found a solution, but I don't know if it's the right one, or if it's the
best one.
Actually, the string gets encoded (at least for us) byte par byte (ie. you
have %xx%yy%zz  for one chinese/japanese char). This doesn't come out well
in java string (you will have a 3 chars string)

So what we did was pass this String thru the following function:

byte[] temp=getBytes(URLString,"ISO8859-1"); // or another encoding which is
1byte/char
translated=new String(temp,"your-encoding-here");  // translated will be
encoded right

For tests, we only used IE5 english version, so I don't know if other
browsers encode this differently. But this function worked for us...

Hope this helps...


----- Original Message -----
From: "Tsui, Alban" <Alban.Tsui@COGNOS.com>
To: <cocoon-users@xml.apache.org>
Sent: Tuesday, January 29, 2002 5:31 PM
Subject: url & unicode


> Hi
>
> I am using the request logicsheet to get values from the URL. however, I
> need to pass in some unicode string (for chinese, japanese etc.) from the
> URL... and I don't konw how to do it?!! Will the request logicsheet
convert
> the string properly into Java String (which is unicode based)?
>
> Alban
>
>
> This message may contain privileged and/or confidential information.  If
you
> have received this e-mail in error or are not the intended recipient, you
> may not use, copy, disseminate or distribute it; do not open any
> attachments, delete it immediately from your system and notify the sender
> promptly by e-mail that you have done so.  Thank you.
>
> ---------------------------------------------------------------------
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message