Re: Strange print

I am not completely sure, but you can try to play with $KCODE variable
settings. I am sure you know this, put ‘p “abc”’ is equivalent to ‘puts
“abc”.inspect’ and ‘inspect’ outputs non-printable characters in escaped
form (like ‘\n’ or ‘\326’).

UPDATE: I just checked that with $KCODE = ‘u’, p shows “College” in
Russian just like that – “bea[u]tiful text” ;-).


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