As you can see, I have two simple dropdowns and a textfield to search for employees. In this case I try to search for an employee with last name "Müller" ... or something else with ä, ö, ü, ... special characters.
It seems to me that everything works fine, but when building the URL, it generates M%C3%BC...
That's kind of awkward, because I just can't get it to search for "Müller" ...
I guess there is an encoding problem, but I cannot spot it ...
In my JSP, I have <%@ page pageEncoding="UTF-8" %> and <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>, it is saved as UTF-8 and so on. In the HTTP-Header, it says "Content-Typeapplication/json;charset=UTF-8" too ...
I don't know what to do now ... can someone help me with that one?
I don't think this is an ExtJS question but I'll attempt to answer it anyway.
You can't just send 'Müller' in a URL, it's invalid. It has to be be URL encoded.
The encoding you're seeing appears to be UTF-8. This is what JavaScript does by default if you call encodeURIComponent('Müller').
For a POST request there is a convention that all parameters should be URL-encoded as UTF-8. Unfortunately no such convention exists for GET requests and by default many servers (including Tomcat) will use ISO-8859-1.
When I'm working with a Java server I tend to force all my requests to POST requests, largely to avoid this problem. It isn't so bad if you have full control over the server but when you're just deploying a WAR file it's a real nuisance to ask people to edit their Tomcat config.
I don't think this is an ExtJS question but I'll attempt to answer it anyway.
You can't just send 'Müller' in a URL, it's invalid. It has to be be URL encoded.
The encoding you're seeing appears to be UTF-8. This is what JavaScript does by default if you call encodeURIComponent('Müller').
For a POST request there is a convention that all parameters should be URL-encoded as UTF-8. Unfortunately no such convention exists for GET requests and by default many servers (including Tomcat) will use ISO-8859-1.
When I'm working with a Java server I tend to force all my requests to POST requests, largely to avoid this problem. It isn't so bad if you have full control over the server but when you're just deploying a WAR file it's a real nuisance to ask people to edit their Tomcat config.