Project

General

Profile

« Previous | Next » 

Revision 05d7d889

Added by naruse (Yui NARUSE) over 14 years ago

  • string.c (rb_str_inspect): inspect as a dummy encoding string
    when a UTF-16/32 (not BE/LE) string does not have a BOM.
    Unicode and some RFCs say that a string labeld as UTF-16/32
    doesn't have a BOM, it should be considered big endian.
    But many Windows programs generates little endian UTF-16
    strings without a BOM. So String#inspect treats a string
    labeled UTF-16/32 withaout a BOM as a dummy encoding string.
    patched by Martin Duerst. [ruby-core:33461]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e