Issue #3884 has been updated by Nobuyoshi Nakada. Status changed from Open to Rejected LC_* vars only affect the source encoding of -e option, but not of script file. $ echo 'puts __ENCODING__' > enc.rb $ LC_ALL=ja_JP.utf-8 ruby enc.rb US-ASCII $ LC_ALL=ja_JP.utf-8 ruby -e 'puts __ENCODING__' UTF-8 ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3884 ---------------------------------------- http://redmine.ruby-lang.org