ruby-changes:13975
From: akr <ko1@a...>
Date: Mon, 16 Nov 2009 01:37:52 +0900 (JST)
Subject: [ruby-changes:13975] Ruby:r25782 (trunk): * encoding.c (rb_filesystem_encindex): use default external encoding
akr 2009-11-16 01:37:38 +0900 (Mon, 16 Nov 2009) New Revision: 25782 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25782 Log: * 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. Modified files: trunk/ChangeLog trunk/encoding.c trunk/ruby.c Index: encoding.c =================================================================== --- encoding.c (revision 25781) +++ encoding.c (revision 25782) @@ -1129,7 +1129,7 @@ #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); Index: ChangeLog =================================================================== --- ChangeLog (revision 25781) +++ ChangeLog (revision 25782) @@ -1,3 +1,11 @@ +Mon Nov 16 01:35:34 2009 Tanaka Akira <akr@f...> + + * 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@t...> * thread.c (thread_cleanup_func): delete locking_mutex when thread Index: ruby.c =================================================================== --- ruby.c (revision 25781) +++ ruby.c (revision 25782) @@ -1302,7 +1302,6 @@ 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 @@ 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)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/