From: David ‘Bombe’ Roden Date: Sun, 6 Jan 2013 23:17:02 +0000 (+0100) Subject: Use ISO-8859-1 as default charset to prevent UTF-8 decoding errors. X-Git-Tag: 0.1~54 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b0a2729a6c32415f0466f2c449bd34e67ae8a22e;p=rhynodge.git Use ISO-8859-1 as default charset to prevent UTF-8 decoding errors. --- 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"; } //