mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f188db3105
commit
161f0a1699
2 changed files with 5 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Jul 10 23:10:11 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.
|
||||
|
||||
Fri Jul 10 23:04:16 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* io.c (io_strip_bom): Fix condition of second byte of
|
||||
|
|
1
io.c
1
io.c
|
@ -4564,6 +4564,7 @@ io_strip_bom(VALUE io)
|
|||
rb_io_ungetbyte(io, INT2FIX(b4));
|
||||
}
|
||||
else {
|
||||
rb_io_ungetbyte(io, INT2FIX(b3));
|
||||
return rb_enc_find_index("UTF-16LE");
|
||||
}
|
||||
rb_io_ungetbyte(io, INT2FIX(b3));
|
||||
|
|
Loading…
Add table
Reference in a new issue