[前][次][番号順一覧][スレッド一覧]

ruby-changes:12328

From: naruse <ko1@a...>
Date: Fri, 10 Jul 2009 23:21:19 +0900 (JST)
Subject: [ruby-changes:12328] Ruby:r24023 (trunk): Fix condition of second byte of UTF-16LE/UTF-32LE.

naruse	2009-07-10 23:21:04 +0900 (Fri, 10 Jul 2009)

  New Revision: 24023

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24023

  Log:
    Fix condition of second byte of UTF-16LE/UTF-32LE.

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24022)
+++ ChangeLog	(revision 24023)
@@ -1,3 +1,8 @@
+Fri Jul 10 23:04:16 2009  NARUSE, Yui  <naruse@r...>
+
+	* 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@t...>
 
 	* ext/readline/extconf.rb: checked rl_refresh_line in readline.
Index: io.c
===================================================================
--- io.c	(revision 24022)
+++ io.c	(revision 24023)
@@ -4554,7 +4554,7 @@
 
       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));

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]