diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-10 14:21:04 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-10 14:21:04 +0000 |
| commit | 0b928205a47e00dc226fc5e3625375264fabee59 (patch) | |
| tree | 27437bd428ea7dbb525faf4af75328caa07d8818 | |
| parent | 424c23f9d37340717e7c16118985748ff442b7af (diff) | |
| download | ruby-0b928205a47e00dc226fc5e3625375264fabee59.tar.gz ruby-0b928205a47e00dc226fc5e3625375264fabee59.tar.xz ruby-0b928205a47e00dc226fc5e3625375264fabee59.zip | |
Fix condition of second byte of UTF-16LE/UTF-32LE.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Jul 10 23:04:16 2009 NARUSE, Yui <naruse@ruby-lang.org> + + * io.c (io_strip_bom): Fix condition of second byte of + UTF-16LE/UTF-32LE. + Fri Jul 10 21:45:30 2009 TAKAO Kouji <kouji@takao7.net> * ext/readline/extconf.rb: checked rl_refresh_line in readline. @@ -4554,7 +4554,7 @@ io_strip_bom(VALUE io) case 0xFF: b2 = FIX2INT(rb_io_getbyte(io)); - if (b2 == 0xFF) { + if (b2 == 0xFE) { b3 = FIX2INT(rb_io_getbyte(io)); if (b3 == 0) { b4 = FIX2INT(rb_io_getbyte(io)); |
