M
Mickey Segal
When you use a URLConnection, can you impose a Unicode character encoding
for the text POSTed? I image one could add the encoding like this:
BufferedWriter bufferedWriter = new BufferedWriter(new
OutputStreamWriter(urlConnection.getOutputStream(), "UTF8"));
bufferedWriter.write(query,0,query.length());
but I don't see an encoding parameter in the servlet's
ServletRequest.getParameter() method. Is encoding supposed to be recognized
automatically? If not, is there a way to specify character encoding when
POSTing to a servlet and have it recognized?
for the text POSTed? I image one could add the encoding like this:
BufferedWriter bufferedWriter = new BufferedWriter(new
OutputStreamWriter(urlConnection.getOutputStream(), "UTF8"));
bufferedWriter.write(query,0,query.length());
but I don't see an encoding parameter in the servlet's
ServletRequest.getParameter() method. Is encoding supposed to be recognized
automatically? If not, is there a way to specify character encoding when
POSTing to a servlet and have it recognized?