diff options
-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 |