From: Matthias H Date: Thu, 27 Mar 2014 07:14:32 +0000 (+0100) Subject: [httputil] fix unknown fallback encoding X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=98d6450f694f87f0bacd94dd20eee6cec67f7aaa;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git [httputil] fix unknown fallback encoding --- diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index aba730f9..39a47816 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -44,7 +44,7 @@ module ::Net ctype = self['content-type'] || 'text/html' return nil unless ctype =~ /^text/i || ctype =~ /x(ht)?ml/i - charsets = ['latin1'] # should be in config + charsets = ['ISO-8859-1'] # should be in config if ctype.match(/charset=["']?([^\s"']+)["']?/i) charsets << $1