mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d85195712d
commit
0a946cde01
1 changed files with 3 additions and 0 deletions
|
@ -65,6 +65,9 @@ Init_enc_set_filesystem_encoding(void)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue