Bug #692: non-ascii comment with Encoding.default_internal set raises Encoding::InvalidByteSequenceError
http://redmine.ruby-lang.org/issues/show/692

Author: Stefan Lang
Status: Open, Priority: Normal

$ cat utf8comment.rb
    # encoding: utf-8
    # comment containing non ascii char: รถ
    p Encoding.default_internal
    p __ENCODING__
    p "foo".encoding

    $ ruby19 --version
    ruby 1.9.1 (2008-10-28 revision 19983) [x86_64-linux]

    $ ruby19 utf8comment.rb
    nil
    #<Encoding:UTF-8>
    #<Encoding:UTF-8>

    $ ruby19 -U utf8comment.rb
    ruby19: "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)


----------------------------------------
http://redmine.ruby-lang.org