I just saw this video:
And was trying to reproduce the example in there. I got Edge Rails
So what I did was this (the comments are the output from the console):
$KCODE = ‘u’ # => ‘u’
c = ‘Café is a nice word’ # => “Caf\202 is a nice word”
puts c.reverse # drow ecin a si éfaC
As you can see these results are quite different from what appears on
the video. Furthermore if I type this:
puts c.chars.reverse # drow ecin a si ôÇÜfaC
And what’s even worse, it even modified my string and now my c object
is messed up, if I type this:
c # I get this: CafôÇÜ is a nice word
It modified my string!
Anyone has any ideas why this could be happening?
About the rails console:
Oh, and I want to know, why I can’t use my Alt Gr key in the rails
console, neither my numpad to input ASCII codes for chars that I need
(because I can’t use the Alt Gr key).
For example, I can’t type “[” (a square bracket) in the console,
because I need to push "Alt Gr + “[”, so I thought:
“hmm I will use the ASCII code for that square bracket” (the code it’s
and when I tried to use my numpad in combination with my ALT key,
unexpected characters started to appear.
When numlock is activated, pressing ALT + Numpad1 I get the “a” char.
When numlock is deactivated, pressing that key combo will render a “#”