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

ruby-changes:43377

From: duerst <ko1@a...>
Date: Sun, 19 Jun 2016 15:01:30 +0900 (JST)
Subject: [ruby-changes:43377] duerst:r55451 (trunk): * localeinit.c: Fix filesystem encoding for cygwin to UTF-8 (see

duerst	2016-06-19 15:01:25 +0900 (Sun, 19 Jun 2016)

  New Revision: 55451

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55451

  Log:
    * localeinit.c: Fix filesystem encoding for cygwin to UTF-8 (see
      https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-unusual)

  Modified files:
    trunk/ChangeLog
    trunk/localeinit.c
Index: localeinit.c
===================================================================
--- localeinit.c	(revision 55450)
+++ localeinit.c	(revision 55451)
@@ -100,11 +100,13 @@ Init_enc_set_filesystem_encoding(void) https://github.com/ruby/ruby/blob/trunk/localeinit.c#L100
     int idx;
 #if defined NO_LOCALE_CHARMAP
 # error NO_LOCALE_CHARMAP defined
-#elif defined _WIN32 || defined __CYGWIN__
+#elif defined _WIN32 
     char cp[SIZEOF_CP_NAME];
     CP_FORMAT(cp, AreFileApisANSI() ? GetACP() : GetOEMCP());
     idx = rb_enc_find_index(cp);
     if (idx < 0) idx = ENCINDEX_ASCII;
+#elif defined __CYGWIN__
+    idx = ENCINDEX_UTF_8;
 #else
     idx = rb_enc_to_index(rb_default_external_encoding());
 #endif
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55450)
+++ ChangeLog	(revision 55451)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jun 19 15:01:18 2016  Martin Duerst  <duerst@i...>
+
+	* localeinit.c: Fix filesystem encoding for cygwin to UTF-8 (see
+	  https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-unusual)
+
 Sun Jun 19 14:31:07 2016  Kazuki Yamaguchi  <k@r...>
 
 	* ext/openssl/ossl_pkey.h, ext/openssl/ossl_pkey_dh.c,

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

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