mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Opik <opp...@gmail.com>
Subject Re: Apache mina 1.1.0 and russian letters from GET request
Date Wed, 16 May 2007 13:46:10 GMT
Hm, I use Netbeans, Default charset on it is UTF-8, option to compile is the
same - UTF-8. and I added the line to netbeans.conf - -
J-Dfile.encoding=UTF-8. So, all in UTF-8.
And if i append russians letters in the code:
response.appendBody("тест"); it's look OK, problem only with getting params
from query string.

Sorry for my english ^)

2007/5/16, Emmanuel Lecharny <elecharny@gmail.com>:
>
> Can you show us the code you used to create the hz String ? Are you typing
> String hz = "абв" directly into your code ? In this case, you will have
> problems, unless your file is saved as UTF-8 encoded. As a rule of thumb,
> if
> you are using non-ascii chars into a String try to use the encoded Unicode
> sequence (String hz = "\u410\u411\u412"; )
>
> The best would be that you copy/paste the failing code you are using.
>
> On 5/16/07, Opik <oppres@gmail.com> wrote:
> >
> > I tryed:
> >                    response.appendBody("<br />QP.decode: " +
> > QuotedPrintable.decode( hz ));
> >                    response.appendBody("<br />URLDecoder.decode: " +
> > URLDecoder.decode( hz , "UTF-8"));
> >
> > With no result...
> > After URLDecoder.decode I have only "��" instead of russians letters.
> > Sources and other places in UTF-8
> >
> > 2007/5/16, Niklas Therning <niklas@trillian.se>:
> > >
> > > Opik wrote:
> > > > I use apache mina example (http codec server)
> > > > I can't get a right UTF-8 charset from request. I get only
> %E0%E1%E2,
> > > > (The
> > > > right is абв), I tryed to use URLDecoder.decode(str, "UTF-8"), but
> the
> > > > same
> > > > error...
> > >
> > > I think you need to URL decode the string first. %xx is an encoded
> > > character. Have a look at the Javadoc for java.net.URLDecoder.
> > >
> > > --
> > > Niklas Therning
> > > www.spamdrain.net
> > >
> > >
> > >
> >
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message