[MacRuby] #742: Encoding is always UTF-8 (?)
#742: Encoding is always UTF-8 (?) ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test code: {{{ $ cat a.rb # coding: us-ascii p __ENCODING__ #=> #<Encoding:US-ASCII> p "abc".encoding #=> #<Encoding:US-ASCII> p "\x80".encoding #=> #<Encoding:ASCII-8BIT> }}} Result on Ruby 1.9.2 preview3: {{{ $ ruby -v a.rb ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0] #<Encoding:US-ASCII> #<Encoding:US-ASCII> #<Encoding:ASCII-8BIT> }}} Result on MacRuby: {{{ $ macruby a.rb #<Encoding:US-ASCII> #<Encoding:UTF-8> #<Encoding:UTF-8> }}} When script encoding is "us-ascii", I think that literal encoding should return "ASCII-8BIT". -- Ticket URL: <http://www.macruby.org/trac/ticket/742> MacRuby <http://macruby.org/>
#742: Encoding is always UTF-8 (?) ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): MacRuby doesn't really honor the script encoding setting. It uses UTF-8 by default for pretty much everything. I suspect it's not going to change any time soon, though better compatibility could be added once we approach 1.0. -- Ticket URL: <http://www.macruby.org/trac/ticket/742#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby