In another question it was asked how to replace Umlaute. The accepted question was the following code:
# encoding: utf-8
foo = "ich bin doch nicht blöd, mann!".gsub(/[äöü]/) do |match|
case match
when "ä" 'ae'
when "ö" 'oe'
when "ü" 'ue'
end
end
puts foo
However, when I try to run this, the output is:
$ ruby /tmp/test.rb
ich bin doch nicht bld, mann!
So the Umlaute obviously don't get replaced. Is there something I am missing? I'm using Ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]