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:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 4:35 PM
> To: [EMAIL PROTECTED]
> 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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to