So, the javadoc for URLEncoder's encode and URLDecoder's decode have this note in them:
Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites."
However, if someone sends in a request with a different encoding type, wouldn't it be a bad idea to encode with UTF-8? Is there anything wrong with checking a header (if it exists) and using whatever encoding is specified in there? Perhaps some more background to this note would allow it to make more sense to me, if anyone can provide it.