From 05dbed74ddf758a32461b9b10c170a1f7829fba0 Mon Sep 17 00:00:00 2001 From: Bruno Michel Date: Thu, 24 Jun 2010 15:35:44 +0200 Subject: [PATCH] Force UTF-8 encoding --- lib/redis/client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redis/client.rb b/lib/redis/client.rb index 2ac0b986f..7962f6202 100644 --- a/lib/redis/client.rb +++ b/lib/redis/client.rb @@ -172,7 +172,7 @@ def format_error_reply(line) end def format_status_reply(line) - line.strip + line.strip.force_encoding('UTF-8') end def format_integer_reply(line) @@ -184,7 +184,7 @@ def format_bulk_reply(line) return if bulklen == -1 reply = @sock.read(bulklen) @sock.read(2) # Discard CRLF. - reply + reply.force_encoding('UTF-8') end def format_multi_bulk_reply(line)