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

ruby-changes:3550

From: ko1@a...
Date: Mon, 14 Jan 2008 18:09:13 +0900 (JST)
Subject: [ruby-changes:3550] naruse - Ruby:r15039 (trunk): * encoding.c (rb_locale_encoding): return US-ASCII when charmap is nil.

naruse	2008-01-14 18:08:45 +0900 (Mon, 14 Jan 2008)

  New Revision: 15039

  Modified files:
    trunk/ChangeLog
    trunk/enc/euc_kr.c
    trunk/enc/euc_tw.c
    trunk/encoding.c

  Log:
    * encoding.c (rb_locale_encoding): return US-ASCII when charmap is nil.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/euc_tw.c?r1=15039&r2=15038&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15039&r2=15038&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/euc_kr.c?r1=15039&r2=15038&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=15039&r2=15038&diff_format=u

Index: encoding.c
===================================================================
--- encoding.c	(revision 15038)
+++ encoding.c	(revision 15039)
@@ -874,9 +874,9 @@
     int idx;
 
     if (NIL_P(charmap))
-        return rb_ascii8bit_encoding();
-
-    idx = rb_enc_find_index(StringValueCStr(charmap));
+        idx = rb_enc_find_index("US-ASCII");
+    else
+        idx = rb_enc_find_index(StringValueCStr(charmap));
     if (idx < 0)
         return rb_ascii8bit_encoding();
 
@@ -1093,7 +1093,7 @@
     rb_define_dummy_encoding("ISO-2022-JP");
     rb_enc_alias("ISO2022-JP", "ISO-2022-JP");
     rb_define_dummy_encoding("ISO-2022-JP-2");
-    rb_enc_alias("ISO2022-JP-2", "ISO-2022-JP-2");
+    rb_enc_alias("ISO2022-JP2", "ISO-2022-JP-2");
 }
 
 /* locale insensitive functions */
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15038)
+++ ChangeLog	(revision 15039)
@@ -1,3 +1,8 @@
+Mon Jan 14 18:06:37 2008  NARUSE, Yui  <naruse@r...>
+
+	* encoding.c (rb_locale_encoding): return US-ASCII when charmap is
+	  nil.
+
 Mon Jan 14 16:12:58 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* lib/shellwords.rb: scape should be an alias to shellescape.  a
Index: enc/euc_tw.c
===================================================================
--- enc/euc_tw.c	(revision 15038)
+++ enc/euc_tw.c	(revision 15039)
@@ -138,3 +138,4 @@
   euctw_left_adjust_char_head,
   euctw_is_allowed_reverse_match
 };
+ENC_ALIAS("eucTW", "EUC-TW");
Index: enc/euc_kr.c
===================================================================
--- enc/euc_kr.c	(revision 15038)
+++ enc/euc_kr.c	(revision 15039)
@@ -138,5 +138,7 @@
   euckr_left_adjust_char_head,
   euckr_is_allowed_reverse_match
 };
+ENC_ALIAS("eucKR", "EUC-KR");
 ENC_REPLICATE("EUC-CN", "EUC-KR");
+ENC_ALIAS("eucCN", "EUC-CN");
 ENC_REPLICATE("CP949", "EUC-KR");

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

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