summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-06 14:22:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-06 14:22:52 +0000
commit0751c5d16d983ae9541bdbfb109d4b310ee162d9 (patch)
tree233e4b439488230ecff05d02fa46e28d1dec217d /encoding.c
parent960e8a419f9bbf4b48f534c66972e833d56e8289 (diff)
reapply r37098
UTF-16 and UTF-32 are also treated as unicode since r37101. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/encoding.c b/encoding.c
index 889cf18e1a..b9e820fa29 100644
--- a/encoding.c
+++ b/encoding.c
@@ -458,8 +458,7 @@ enc_ascii_compatible_p(VALUE enc)
int
rb_enc_unicode_p(rb_encoding *enc)
{
- const char *name = rb_enc_name(enc);
- return name[0] == 'U' && name[1] == 'T' && name[2] == 'F' && name[4] != '7';
+ return ONIGENC_IS_UNICODE(enc);
}
static st_data_t