You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Apostolidis Apostolos <ap...@csd.uoc.gr> on 2005/08/02 19:15:39 UTC

URGENT : GET/POST argument encodings

    Hi all. I am trying to post some input data via submitting a form.
The input language is greek , but i have set the encoding (from the
layout-responsible default.jsp to the specific portlet i am using)
to UTF-8. When the form submits, i use  the code below :

java.net.URLEncoder.encode( input, "UTF-8" ) (to encode the parameter to UTF-8)
java.net.URLDecoder.decode(input, "ISO-8859-7") (to decode the parameter to ISO-8859-7)

but the output I get is uncomprehendable (probably the encoding was messed 
up from the begining). Does anybody now if Jetspeed handles GET/POST 
events and encodes input fields by itself? Note that the portlet I am 
using produces a perfect output if it is used outside the Jetspeed context
(i.e. in the Tomcat ROOT folder).

Thanx in advance



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: URGENT : GET/POST argument encodings

Posted by Shinsuke SUGAYA <sh...@yahoo.co.jp>.
Apostolidis Apostolos wrote:
>    Hi all. I am trying to post some input data via submitting a form.
> The input language is greek , but i have set the encoding (from the
> layout-responsible default.jsp to the specific portlet i am using)
> to UTF-8. When the form submits, i use  the code below :
> 
> java.net.URLEncoder.encode( input, "UTF-8" ) (to encode the parameter to 
> UTF-8)
> java.net.URLDecoder.decode(input, "ISO-8859-7") (to decode the parameter 
> to ISO-8859-7)

If a string encoded by UTF-8 is decoded by others, it will be
displayed as garbage usually.

Jetspeed can handle non-ascii characters properly.

Thanks,
  shinsuke

> but the output I get is uncomprehendable (probably the encoding was 
> messed up from the begining). Does anybody now if Jetspeed handles 
> GET/POST events and encodes input fields by itself? Note that the 
> portlet I am using produces a perfect output if it is used outside the 
> Jetspeed context
> (i.e. in the Tomcat ROOT folder).
> 
> Thanx in advance
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> 

__________________________________
Save the earth
http://pr.mail.yahoo.co.jp/ondanka/


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org