Skip to content

Commit

Permalink
Force UTF-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Jun 24, 2010
1 parent 8fa2151 commit 05dbed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/redis/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 05dbed7

Please sign in to comment.