Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Opik
Hm, I tryed to do this: URLDecoder.decode(hz, "cp1251") And it works! Very strange why cp1251? 2007/5/16, Emmanuel Lecharny <[EMAIL PROTECTED]>: Can you try to add the String in : response.appendBody("тест") using escaped unicode ? ("\u" for each char) Just to check if it works better... (don

Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Emmanuel Lecharny
Can you try to add the String in : response.appendBody("тест") using escaped unicode ? ("\u" for each char) Just to check if it works better... (don't worry about your english, I'm not sure there are a lot of english natives working on Mina :) Emmanuel On 5/16/07, Opik <[EMAIL PROTECTED]> wrote

Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Opik
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 f

Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Opik
OK. look: public void messageReceived( IoSession session, Object message ) { try { HttpRequestMessage request = (HttpRequestMessage) message; String hz = request.getParameter("test"); etc... 2007/5/16, Emmanuel Lecharny <[EMAIL PROTECTED]>: Can you

Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Emmanuel Lecharny
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

Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Opik
I tryed: response.appendBody("QP.decode: " + QuotedPrintable.decode( hz )); response.appendBody("URLDecoder.decode: " + URLDecoder.decode( hz , "UTF-8")); With no result... After URLDecoder.decode I have only "��" instead of russians letters. Sources and other

Re: Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Niklas Therning
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 c

Apache mina 1.1.0 and russian letters from GET request

2007-05-16 Thread Opik
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...