From b371766ce1aee6ff2aa0fbb4fde6827edf4c566b Mon Sep 17 00:00:00 2001 From: Nickolay Kolev Date: Thu, 5 Apr 2012 08:44:44 +0200 Subject: [PATCH] force encoding of downloaded blubrs to utf-8 in case JSON::parse heuristics fail to recognize it as such --- lib/copycopter_client/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/copycopter_client/client.rb b/lib/copycopter_client/client.rb index e01b616..a9fb8fe 100644 --- a/lib/copycopter_client/client.rb +++ b/lib/copycopter_client/client.rb @@ -50,7 +50,7 @@ def download if check response log 'Downloaded translations' - yield JSON.parse(response.body) + yield JSON.parse(response.body.force_encoding('UTF-8')) else log 'No new translations' end