Run said:
I believe you're misunderstanding what internal and external encodings
represent. For a thorough explanation, see
http://goo.gl/iUBCX .
Thanks, but I'm well aware of the magic comments.
You're missing the point(s):
$ rvm use 1.9.2
$ ruby -e 'p __ENCODING__'
#<Encoding:UTF-8>
so the default encoding is UTF-8. Why does a UTF-8 file fail to be parsed as UTF-8 then?
(Answer: because Ruby has a schizophrenia about its default encoding, and defaults to US-ASCII
for files).
Next,
$ ruby -h
lists 23 lines of options, but not -K, which is the one that fixes the above problem. Why?
(Answer: because someone made arbitrary decisions about which options need -h help,
or made changes in options without bothering to cross-check the help. Arbitrary, or careless,
you choose. Either way it should be fixed.)
Clifford Heath.