mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (rb_filesystem_encindex): use default external encoding
instead of locale encoding in Unix. * ruby.c (process_options): delay inifilesystem encoding initialization after default external encoding initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
43bd807c43
commit
1aba3f9d76
3 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
Mon Nov 16 01:35:34 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* encoding.c (rb_filesystem_encindex): use default external encoding
|
||||
instead of locale encoding in Unix.
|
||||
|
||||
* ruby.c (process_options): delay inifilesystem encoding
|
||||
initialization after default external encoding initialization.
|
||||
|
||||
Mon Nov 16 00:06:26 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* thread.c (thread_cleanup_func): delete locking_mutex when thread
|
||||
|
|
|
@ -1129,7 +1129,7 @@ rb_filesystem_encindex(void)
|
|||
#elif defined __APPLE__
|
||||
idx = rb_utf8_encindex();
|
||||
#else
|
||||
idx = rb_locale_encindex();
|
||||
idx = rb_enc_to_index(rb_default_external_encoding());
|
||||
#endif
|
||||
|
||||
if (rb_enc_registered("filesystem") < 0) enc_alias_internal("filesystem", idx);
|
||||
|
|
2
ruby.c
2
ruby.c
|
@ -1302,7 +1302,6 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
|
|||
ruby_init_loadpath_safe(opt->safe_level);
|
||||
rb_enc_find_index("encdb");
|
||||
lenc = rb_locale_encoding();
|
||||
(void)rb_filesystem_encoding();
|
||||
rb_enc_associate(rb_progname, lenc);
|
||||
parser = rb_parser_new();
|
||||
if (opt->dump & DUMP_BIT(yydebug)) {
|
||||
|
@ -1325,6 +1324,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
|
|||
enc = lenc;
|
||||
}
|
||||
rb_enc_set_default_external(rb_enc_from_encoding(enc));
|
||||
(void)rb_filesystem_encoding();
|
||||
if (opt->intern.enc.index >= 0) {
|
||||
enc = rb_enc_from_index(opt->intern.enc.index);
|
||||
rb_enc_set_default_internal(rb_enc_from_encoding(enc));
|
||||
|
|
Loading…
Reference in a new issue