Bug in java.net.URLEncoder()

J

J_e_n_s

In java11, there is a bug in java.net.URLEncoder():
To encode the characters, it uses a OutputStreamWriter with the
*default* encoding which is the encoding of the machine
(file.encoding).
If the default encoding on a machine is not 8859-1, for example an
"ä" is encoded to %84. Correct would be %E4.

Jens M Schlatter

fup2 comp.lang.java.programmer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top