From 01b2f2651a93de0edf928b4053d6f4a16d0c5817 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Tue, 22 Jan 2013 21:42:15 +0100 Subject: Force results from wiki requests to be UTF-8 --- sources/wiki/lib/mediawikiapi.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sources') diff --git a/sources/wiki/lib/mediawikiapi.rb b/sources/wiki/lib/mediawikiapi.rb index d799041..c924f66 100644 --- a/sources/wiki/lib/mediawikiapi.rb +++ b/sources/wiki/lib/mediawikiapi.rb @@ -52,7 +52,9 @@ module MediaWikiAPI path = build_path(params) http = Net::HTTP.start(@host, @port) # puts "Getting path [#{path}]" - http.get(path, @headers) + result = http.get(path, @headers) + result.body.force_encoding('UTF-8') + result end def query(params) -- cgit v1.2.3