Each_char yields extra NUL

e$B0J2<$N$h$&$K$9$k$H!"e(BString#each_char e$B$,85$NJ8;zNs$K$O4^$^$le(B
e$B$F$$$J$$e(B \x00 e$B$r4^$`J8;zNs$re(B yield e$B$7$^$9!#e(B

% ./ruby -ve ‘"\xC2\x80\x80".force_encoding(“utf-8”).each_char {|x| p x
}’
ruby 1.9.0 (2008-01-21 revision 0) [i686-linux]
“\xC2\x80”
“\x80\x00”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs