开发者

unescape a string

开发者 https://www.devze.com 2023-01-16 21:43 出处:网络
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 J

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

精彩评论

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