utf-8, GET and Request.getQueryString()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dolittle
    New Member
    • Sep 2007
    • 54

    #1

    utf-8, GET and Request.getQueryString()

    Hi,

    I`m using a server that receive a GET request with a query string that contains double-byte non-latin characters:

    Code:
    http://www.example.com?%d7%90
    and the java code:

    Code:
     String queryString = request.getQueryString();
    queryString = URLDecoder.decode(queryString, "utf-8");
    I`m getting ? characters instead.
    It works fine with > charcater (%3e) though.

    I`m using fiddler and firebug to ansure that the url is correctly encoded and compare it with http://www.profitcode. net/resources/tools/utf8_encoder_ap plet.html

    On eclipse I set a breakpoint and see that the queryString is correct but when using URLDecoder only the non-latin character turn to ?.

    Is there an alternative or a workaround to URLDecoder?

    Thanks
Working...