diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-22 21:42:15 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-22 21:42:15 +0100 |
commit | 01b2f2651a93de0edf928b4053d6f4a16d0c5817 (patch) | |
tree | bc2bcfe82d665139912a4b6c291c36a7f150e4fa /sources/wiki | |
parent | 0bb38d10ed88b21f09efc5e0dcfb0d3926f1b206 (diff) | |
download | taginfo-01b2f2651a93de0edf928b4053d6f4a16d0c5817.tar taginfo-01b2f2651a93de0edf928b4053d6f4a16d0c5817.tar.gz |
Force results from wiki requests to be UTF-8
Diffstat (limited to 'sources/wiki')
-rw-r--r-- | sources/wiki/lib/mediawikiapi.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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) |