mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02: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
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
Add a link
Reference in a new issue