[前][次][番号順一覧][スレッド一覧]

ruby-changes:2179

From: ko1@a...
Date: 10 Oct 2007 16:36:10 +0900
Subject: [ruby-changes:2179] akr - Ruby:r13670 (trunk): * encoding.c (rb_enc_init): don't alias iso-8859-1 to ascii.

akr	2007-10-10 15:50:33 +0900 (Wed, 10 Oct 2007)

  New Revision: 13670

  Modified files:
    trunk/ChangeLog
    trunk/ascii.c
    trunk/encoding.c

  Log:
    * encoding.c (rb_enc_init): don't alias iso-8859-1 to ascii.
    
    * ascii.c (OnigEncodingASCII): change the name US-ASCII to ASCII-8BIT.
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ascii.c?r1=13670&r2=13669
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13670&r2=13669
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=13670&r2=13669

Index: encoding.c
===================================================================
--- encoding.c	(revision 13669)
+++ encoding.c	(revision 13670)
@@ -75,10 +75,10 @@
     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 *
Index: ascii.c
===================================================================
--- ascii.c	(revision 13669)
+++ ascii.c	(revision 13670)
@@ -40,7 +40,7 @@
 
 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,
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13669)
+++ ChangeLog	(revision 13670)
@@ -1,3 +1,9 @@
+Wed Oct 10 15:39:04 2007  Tanaka Akira  <akr@f...>
+
+	* 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  <nobu@r...>
 
 	* string.c (rb_enc_str_coderange): fixed checkfor non-ascii.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]