Use ISO-8859-1 as default charset to prevent UTF-8 decoding errors.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 6 Jan 2013 23:17:02 +0000 (00:17 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 6 Jan 2013 23:17:02 +0000 (00:17 +0100)
src/main/java/net/pterodactylus/reactor/states/HttpState.java

index 38ca80c..442106b 100644 (file)
@@ -132,11 +132,11 @@ public class HttpState extends AbstractState {
         */
        private static String extractCharset(String contentType) {
                if (contentType == null) {
-                       return "UTF-8";
+                       return "ISO-8859-1";
                }
                HeaderElement headerElement = BasicHeaderValueParser.parseHeaderElement(contentType, new BasicHeaderValueParser());
                NameValuePair charset = headerElement.getParameterByName("charset");
-               return (charset != null) ? charset.getValue() : "UTF-8";
+               return (charset != null) ? charset.getValue() : "ISO-8859-1";
        }
 
        //