I've a form with Primefaces. The header of the xml file looks like that:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
When I send the form, I take the values with HttpServletRequest:
public String handleRequest(HttpServletRequest request) {
String shortname = request.getParameter("shortname");
(...)
Now when shortname contains a umlaute, for example an ü, the umlaute will be saved as UTF-8 encoded. So my ü get saved as ü.
How can I decode it again? All the tutorials use a byte-array, but I haven't one.
I need this variable in a EMail, and it doesn't look really good with some hieroglyphics.
request.setCharacterEncoding("UTF-8");?