Hi,
In message "Re: STDIN encoding differs from default source file encoding"
on Thu, 7 Feb 2008 07:05:12 +0900, Dave Thomas <dave / pragprog.com> writes:
|This seems strange:
|
|dave[RUBY3/Book 16:03:45] echo 'p __ENCODING__' > t.rb
|dave[RUBY3/Book 16:03:51] ruby t.rb
|#<Encoding:US-ASCII>
|dave[RUBY3/Book 16:03:55] cat t.rb | ruby
|#<Encoding:UTF-8>
Not really. The default external encoding honors your locale setting,
whereas script encoding does not. Because the input data is basically
yours, and scripts are ours to share.
matz.