diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-06 03:04:55 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-06 03:04:55 +0000 |
commit | a9497d5a842d762ad7e18a7abe9413581ea44804 (patch) | |
tree | f2d591440e1ff6b622fb63ec0a34667a260169b2 | |
parent | b1058ef46c04e8b76139d1985dd549a53396661b (diff) |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | encoding.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index b9e820fa29..889cf18e1a 100644 --- a/encoding.c +++ b/encoding.c @@ -458,7 +458,8 @@ enc_ascii_compatible_p(VALUE enc) 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 |