Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unescape a string

Tags:

java

android

I've looked everywhere, it seems this would be common, and simple. I have a string from a database, "Ros%E9" What is the simplest way to convert it to "Rose" with an accented e?

like image 395
Poolczar Avatar asked Dec 17 '22 21:12

Poolczar


1 Answers

Use Java's URLDecoder class.

Code sample:

String rose = URLDecoder.decode("Rose%E9", "UTF-8");
like image 106
Pablo Santa Cruz Avatar answered Dec 19 '22 09:12

Pablo Santa Cruz