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

ruby-changes:8238

From: matz <ko1@a...>
Date: Mon, 13 Oct 2008 08:03:29 +0900 (JST)
Subject: [ruby-changes:8238] Ruby:r19766 (trunk): * ruby.c (proc_options): add -U command line option to specify

matz	2008-10-13 08:03:17 +0900 (Mon, 13 Oct 2008)

  New Revision: 19766

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19766

  Log:
    * ruby.c (proc_options): add -U command line option to specify
      utf-8 as default_internal.

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19765)
+++ ChangeLog	(revision 19766)
@@ -1,3 +1,8 @@
+Mon Oct 13 07:54:00 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* ruby.c (proc_options): add -U command line option to specify
+	  utf-8 as default_internal.
+
 Mon Oct 13 07:42:57 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* transcode.c (str_transcode0): String#encode() with no encoding
Index: ruby.c
===================================================================
--- ruby.c	(revision 19765)
+++ ruby.c	(revision 19766)
@@ -758,6 +758,10 @@
 	    if (!*++s) goto next_encoding;
 	    goto encoding;
 
+	  case 'U':
+	    opt->intern.enc.name = rb_str_new2("utf-8");
+	    break;
+
 	  case 'K':
 	    if (*++s) {
 		const char *enc_name = 0;

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

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