From b0a2729a6c32415f0466f2c449bd34e67ae8a22e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 7 Jan 2013 00:17:02 +0100 Subject: [PATCH] Use ISO-8859-1 as default charset to prevent UTF-8 decoding errors. --- src/main/java/net/pterodactylus/reactor/states/HttpState.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/reactor/states/HttpState.java b/src/main/java/net/pterodactylus/reactor/states/HttpState.java index 38ca80c..442106b 100644 --- a/src/main/java/net/pterodactylus/reactor/states/HttpState.java +++ b/src/main/java/net/pterodactylus/reactor/states/HttpState.java @@ -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"; } // -- 2.7.4