开发者

unescape a string

I've looked everywhere, it seems this would be common, and simple. I have a string from a dat开发者_运维技巧abase, "Ros%E9" What is the simplest way to convert it to "Rose" with an accented e?


Use Java's URLDecoder class.

Code sample:

String rose = URLDecoder.decode("Rose%E9", "UTF-8");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜