Issue #2139 has been updated by Vit Ondruch.


Even default external encoding is not respected if you'd like to argue about:

irb(main):008:0> Encoding.default_external
=> #<Encoding:CP852>
irb(main):009:0> Encoding.default_external = Encoding.find 'utf-16le'
=> #<Encoding:UTF-16LE>
irb(main):010:0> Encoding.default_external
=> #<Encoding:UTF-16LE>
irb(main):011:0> `cmd /u /c dir /b`.encoding
=> #<Encoding:UTF-16LE>
irb(main):012:0> `cmd /u /c dir /b`
=> "f\x00o\x00l\x00d\x00e\x00r\x001\x00\n\x00\n\x00f\x00o\x00l\x00d\x00e\x00r\x002\x00\n\x00\n\x00"
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2139

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