Friday, 6 September 2013

Java URLDecoder special characters and UTF-8

Java URLDecoder special characters and UTF-8

Take the string Mediæval%20Bæbes. It can be encoded in the URL as either
Medi%E6val+B%E6bes Mediæval%20Bæbes. On the first I get the correct æ
character when decoded. The latter gives me � (the replacement
character). I can't figure out how to get Java to decode it both ways,
possibly in the same URL. I tried java.net.URI and apache's URLCodec as
well.
Thanks

No comments:

Post a Comment