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

ruby-changes:25052

From: naruse <ko1@a...>
Date: Sat, 6 Oct 2012 12:06:24 +0900 (JST)
Subject: [ruby-changes:25052] naruse:r37104 (trunk): Revert r37098

naruse	2012-10-06 12:04:55 +0900 (Sat, 06 Oct 2012)

  New Revision: 37104

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

  Log:
    Revert r37098
    
    This reverts
    * encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
    because UTF-16 and UTF-32 is also treated as unicode in this context.

  Modified files:
    trunk/encoding.c

Index: encoding.c
===================================================================
--- encoding.c	(revision 37103)
+++ encoding.c	(revision 37104)
@@ -458,7 +458,8 @@
 int
 rb_enc_unicode_p(rb_encoding *enc)
 {
-    return ONIGENC_IS_UNICODE(enc);
+    const char *name = rb_enc_name(enc);
+    return name[0] == 'U' && name[1] == 'T' && name[2] == 'F' && name[4] != '7';
 }
 
 static st_data_t

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

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