From: Daniel Mendler Date: 2009-06-19T22:50:19+09:00 Subject: Default encoding in ruby 1.9 Hi, I have a lot of problems with string encodings in ruby 1.9. I always get EncodingErrors because ruby mixes the default encodings. I have set LANG and LC_ALL to a utf locale. test.rb ------- def encoding_sucks_hard(string) "hello " + string end And then -------- irb(main):001:0> require 'test' => true irb(main):002:0> 'test'.encoding => # irb(main):003:0> encoding_sucks_hard('test').encoding => # irb(main):004:0> How can I set the default encoding? Daniel