From e13ca981984c161ccf93eca0273d732be20d815a Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 10 Sep 2009 17:07:38 +0000 Subject: * parse.y (rb_char_to_option_kcode): ASCII-8BIT should also delay. * re.c (parser_regx_options): return rb_ascii8bit_encindex on ASCII-8BIT. [ruby-dev:39300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index 2d7ea2c4c3..e22c8c04c2 100644 --- a/re.c +++ b/re.c @@ -287,7 +287,7 @@ rb_char_to_option_kcode(int c, int *option, int *kcode) switch (c) { case 'n': - *kcode = -1; + *kcode = rb_ascii8bit_encindex(); return (*option = ARG_ENCODING_NONE); case 'e': *kcode = rb_enc_find_index("EUC-JP"); @@ -296,7 +296,7 @@ rb_char_to_option_kcode(int c, int *option, int *kcode) *kcode = rb_enc_find_index("Windows-31J"); break; case 'u': - *kcode = rb_enc_find_index("UTF-8"); + *kcode = rb_utf8_encindex(); break; default: *kcode = -1; -- cgit v1.2.3