how to convert a unicode string in java to hex string.
for example : st = "\u0645" to st = "%D9%85"
?
If you can afford Guava, go for it and use its PercentEscaper
(available as of Guava 15.0).
As nearly always with Guava, well written and performs admirably.
Note that it will not encode ASCII letters or digits (a-z, A-Z, 0-9).