cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject RE: XSP Problem - UnsupportedEncodingException
Date Thu, 12 Jul 2001 15:12:53 GMT
Your POST data should come as the correct encoding!
Have a look at the <meta> tags in your HTML.
It should say ISO-8859-1!

Then you don't have to do any conversions...

(BTW: Have a look into the Java2 API docu.
      I think getBytes() throws a UnsupportedEncodingException)

Hope that helps
--
Torsten

> -----Original Message-----
> From: Georg Schmitt [mailto:apache@georg-schmitt.de]
> Sent: Thursday, July 12, 2001 4:35 PM
> To: cocoon-users@xml.apache.org
> Subject: XSP Problem - UnsupportedEncodingException 
> 
> 
> Hello,
> 
> i have following Problem with xsp:logic and getBytes
> 
> my code is:
> --
> <?xml version="1.0" encoding="UTF-8"?>
> <xsp:page language="java"
>     xmlns:xsp="http://apache.org/xsp"
>     xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> 
>    <page>
>      <xsp:logic>
>       String saveAs = request.getParameter("saveAs");
>       String name_enc = new String(saveAs.getBytes("8859_1"));
>       System.out.println (name_enc);
> 
>      </xsp:logic>
> 
>      <wert><xsp-request:get-parameter name="saveAs" />
>      </wert>
>    </page>
> 
> </xsp:page>
> --
> 
> when i enter an encoding String in getBytes(....), i will get following
> error with cocoon:
> Exception java.io.UnsupportedEncodingException must be caught, or it must be
> declared in the throws clause of this method.
> 
> how can i get the german characters, because the characters, which are
> printed with System.out.println, are not the same i entered as parameter.


---------------------------------------------------------------------
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