title: response.sendredirect with url with foreign chars - how to encode?
body: <p>I have a jsf app that has international users so form inputs can have non-western strings like kanjii and chinese - if I hit my url with ..?q=東日本大 the output on the page is correct and I see the q input in my form gets populated fine.  But if I enter that same string into my form and submit, my app does a redirect back to itself after constructing the url with the populated parameters in the url (seems redundant but this is due to 3rd party integration) but the redirect is not encoding the string properly. I have</p>
  
  <pre><code>url = new String(url.getBytes("ISO-8859-1"), "UTF-8");
  response.sendRedirect(url);
  </code></pre>
  
  <p>But url redirect ends up being q=????  I've played around with various encoding strings (switched around ISO and UTF-8 and just got a bunch of gibberish in the url) in the String constructor but none seem to work to where I get q=東日本大  Any ideas as to what I need to do to get the q=東日本大 populated in the redirect properly?  Thanks.</p>