Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Commit

Permalink
fix issue with unicode strings
Browse files Browse the repository at this point in the history
  • Loading branch information
drudru committed Jan 7, 2014
1 parent 4104cc9 commit 3a3a01f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/unixrack.rb
Expand Up @@ -57,10 +57,11 @@ def self.write_buff(io, buff)

out_buff = buff

# buff should be UTF-8
while true
nw = io.syswrite(out_buff)
nwritten = nwritten + nw
break if nw == out_buff.length
break if nw == out_buff.bytesize
out_buff = out_buff.slice(nw..-1)
end
nwritten
Expand Down

0 comments on commit 3a3a01f

Please sign in to comment.