Skip to content

Commit

Permalink
* localeinit.c: Fix filesystem encoding for cygwin to UTF-8 (see
Browse files Browse the repository at this point in the history
  https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-unusual)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
duerst committed Jun 19, 2016
1 parent 31388c4 commit d282efb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Sun Jun 19 15:01:18 2016 Martin Duerst <duerst@it.aoyama.ac.jp>

* 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@rhe.jp>

* ext/openssl/ossl_pkey.h, ext/openssl/ossl_pkey_dh.c,
Expand Down
4 changes: 3 additions & 1 deletion localeinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ Init_enc_set_filesystem_encoding(void)
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
Expand Down

0 comments on commit d282efb

Please sign in to comment.