Bug #4279: String#unpack('M') always results US-ASCII encoded string
http://redmine.ruby-lang.org/issues/show/4279

Author: Heesob Park
Status: Open, Priority: Normal
Category: core, Target version: 1.9.x
ruby -v: ruby 1.9.3dev (2011-01-10 trunk 30508) [i686-linux] 

$ irb
irb(main):001:0> "=C6=F7".unpack('M*')
=> ["\xC6\xF7"]
irb(main):002:0> "=C6=F7".unpack('M*')[0].encoding
=> #<Encoding:US-ASCII>
irb(main):003:0> "=C6=F7".unpack('M*')[0].valid_encoding?
=> true
irb(main):004:0> "\xC6\xF7".encoding
=> #<Encoding:EUC-KR>
irb(main):005:0> "\xC6\xF7".valid_encoding?
=> true


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