tags:

views:

54

answers:

1
+2  Q: 

unescape a string

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?

+4  A: 

Use Java's URLDecoder class.

Code sample:

String rose = URLDecoder.decode("Rose%E9", "UTF-8");
Pablo Santa Cruz
UTF-8 or ISO-8859-1? (What format is the database in?)
fadden