[All scripts that I work with these German characters are in UTF-8 itself, have #encoding: utf-8 at the top (and Encoding.external_default = 'utf-8' , and not that which is really relevant, because German characters in lines that are defined in the script are not displayed correctly.)]
All of these things are perfectly displayed on the Windows command line and use irb, etc.
I can’t even enter these characters in the prompt. An attempt to insert puts "äöüÄÖÜß" inserted by puts " . An attempt to actually enter them freezes somehow, and I have to ^ D exit.
Using pry, I ran a script with GC = "äöüÄÖÜß" in it, and this is the kind of garbledeegook I get:
[1] pry(main)> GC => "├ñ├Â├╝├ä├û├£├ƒ" [2] pry(main)> GC.split('').each{ |c| puts c } ├ñ ├ ├╝ ├ä ├û ├£ ├ƒ => ["├ñ", "├Â", "├╝", "├ä", "├û", "├£", "├ƒ"] [3] pry(main)> File.open("output.txt", 'w'){|f| GC.split('').each{ |c| f.puts c } }
However, the test file output.txt created by this last line is in utf-8 and reads:
ä ö ü Ä Ö Ü ß
Does anyone have any ideas how to fix this?
source share