encodeURIComponent equivalent in Java?

T

tom fredriksen

int80 said:
Is there an equivalent for encodeURIComponent in Java?

Do you think you could explain in detail what it does or give a link to
some documentation of this function? It would make it much easier for
people to answer your question.

/tom
 
Joined
Aug 25, 2008
Messages
1
Reaction score
0
Since I'm :captain: UTF-8, I will add that URLEncoder.encode(x, "UTF-8") will ensure all non-ASCII characters are also escaped in byte pairs (see http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars).

After many hours of pondering this character set problem :)stupido:) I discovered that the standard is :damnmate: and doesn't allow character sets other than US-ASCII in the URL. So the above way is the defacto standard.

That is all, time for the :loo:
 

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,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top