Bug #3926
closedErrno#message encoding is right ?
Description
=begin
Errno::*#messageは、strerrで取ってきたメッセージなので、encodingは、localeに合わせたものを設定すべきと思うのですがどうでしょうか?
irb(main):001:0> Errno::EINVAL.new.message
=> "Invalid argument"
irb(main):002:0> Errno::EINVAL.new.message.encoding
=> #Encoding:ASCII-8BIT # ……まあ良いとして
irb(main):003:0> Errno::EWOULDBLOCK.new.message
=> "\x83u\x83\x8D\x83b\x83N\x95s\x89\xC2\x82\xCC\x83\\x83P\x83b\x83g\x91\x80\x8
D\xEC\x82\xF0\x82\xB7\x82\xAE\x82\xC9\x8A\xAE\x97\xB9\x82\xC5\x82\xAB\x82\xDC\x8
2\xB9\x82\xF1\x82\xC5\x82\xB5\x82\xBD\x81B"
irb(main):004:0> Errno::EWOULDBLOCK.new.message.encoding
=> #Encoding:ASCII-8BIT # …… CP932 であって欲しい
=end
Updated by naruse (Yui NARUSE) about 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29438.
Akio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end