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

ruby-changes:34121

From: nobu <ko1@a...>
Date: Wed, 28 May 2014 13:27:52 +0900 (JST)
Subject: [ruby-changes:34121] nobu:r46202 (trunk): localeinit.c: fallback filesystem encoding to UTF-8

nobu	2014-05-28 13:27:45 +0900 (Wed, 28 May 2014)

  New Revision: 46202

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

  Log:
    localeinit.c: fallback filesystem encoding to UTF-8
    
    * localeinit.c (Init_enc_set_filesystem_encoding): fallback to
      UTF-8 on Mac OS X, just for convenience sake.

  Modified files:
    trunk/localeinit.c
Index: localeinit.c
===================================================================
--- localeinit.c	(revision 46201)
+++ localeinit.c	(revision 46202)
@@ -65,6 +65,9 @@ Init_enc_set_filesystem_encoding(void) https://github.com/ruby/ruby/blob/trunk/localeinit.c#L65
     if (idx < 0) idx = ENCINDEX_ASCII;
 #else
     idx = rb_enc_to_index(rb_default_external_encoding());
+# if defined __APPLE__
+    if (idx == rb_usascii_encindex()) idx = rb_utf8_encindex();
+# endif
 #endif
     return idx;
 }

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

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