From ee624f97ac3560abfe55e6d8ba88bb38a4016180 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 10 Oct 2007 06:50:33 +0000 Subject: * encoding.c (rb_enc_init): don't alias iso-8859-1 to ascii. * ascii.c (OnigEncodingASCII): change the name US-ASCII to ASCII-8BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ascii.c | 2 +- encoding.c | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index eeb90d8afa..9dab669bfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Oct 10 15:39:04 2007 Tanaka Akira + + * encoding.c (rb_enc_init): don't alias iso-8859-1 to ascii. + + * ascii.c (OnigEncodingASCII): change the name US-ASCII to ASCII-8BIT. + Wed Oct 10 14:31:05 2007 Nobuyoshi Nakada * string.c (rb_enc_str_coderange): fixed checkfor non-ascii. diff --git a/ascii.c b/ascii.c index c2715f4e0d..abf784b165 100644 --- a/ascii.c +++ b/ascii.c @@ -40,7 +40,7 @@ ascii_is_code_ctype(OnigCodePoint code, unsigned int ctype) OnigEncodingType OnigEncodingASCII = { onigenc_single_byte_mbc_enc_len, - "US-ASCII", /* name */ + "ASCII-8BIT",/* name */ 1, /* max byte length */ 1, /* min byte length */ onigenc_is_mbc_newline_0x0a, diff --git a/encoding.c b/encoding.c index 5b0450f190..bee7957e6e 100644 --- a/encoding.c +++ b/encoding.c @@ -75,10 +75,10 @@ rb_enc_init(void) ENC_REGISTER(ONIG_ENCODING_SJIS); ENC_REGISTER(ONIG_ENCODING_UTF8); #undef ENC_REGISTER - rb_enc_alias("ascii", "us-ascii"); - rb_enc_alias("binary", "us-ascii"); - rb_enc_alias("iso-8859-1", "us-ascii"); - rb_enc_alias("sjis", "shift_jis"); + rb_enc_alias("ascii", rb_enc_name(ONIG_ENCODING_ASCII)); + rb_enc_alias("binary", rb_enc_name(ONIG_ENCODING_ASCII)); + rb_enc_alias("us-ascii", rb_enc_name(ONIG_ENCODING_ASCII)); /* will be defined separately in future. */ + rb_enc_alias("sjis", rb_enc_name(ONIG_ENCODING_SJIS)); } rb_encoding * -- cgit v1.2.3