mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (rb_filesystem_encoding): use default external encoding
for Unix. * dir.c (dir_initialize): don't cache fs_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
db30661aa9
commit
d46728ec0e
3 changed files with 12 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
|||
Thu Aug 14 21:10:00 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* encoding.c (rb_filesystem_encoding): use default external encoding
|
||||
for Unix.
|
||||
|
||||
* dir.c (dir_initialize): don't cache fs_encoding.
|
||||
|
||||
Thu Aug 14 20:58:57 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* transcode.c (rb_econv_open_by_transcoder_entries): renamed from
|
||||
|
|
4
dir.c
4
dir.c
|
@ -333,17 +333,15 @@ static VALUE
|
|||
dir_initialize(int argc, VALUE *argv, VALUE dir)
|
||||
{
|
||||
struct dir_data *dp;
|
||||
static rb_encoding *fs_encoding;
|
||||
rb_encoding *extencoding;
|
||||
VALUE dirname, opt;
|
||||
static VALUE sym_extenc;
|
||||
|
||||
if (!sym_extenc) {
|
||||
sym_extenc = ID2SYM(rb_intern("external_encoding"));
|
||||
fs_encoding = rb_filesystem_encoding();
|
||||
}
|
||||
extencoding = rb_filesystem_encoding();
|
||||
|
||||
extencoding = fs_encoding;
|
||||
rb_scan_args(argc, argv, "11", &dirname, &opt);
|
||||
|
||||
if (!NIL_P(opt)) {
|
||||
|
|
10
encoding.c
10
encoding.c
|
@ -962,16 +962,14 @@ rb_locale_encoding(void)
|
|||
rb_encoding *
|
||||
rb_filesystem_encoding(void)
|
||||
{
|
||||
static rb_encoding *enc;
|
||||
if (!enc) {
|
||||
rb_encoding *enc;
|
||||
#if defined _WIN32
|
||||
enc = rb_locale_encoding();
|
||||
enc = rb_locale_encoding();
|
||||
#elif defined __APPLE__
|
||||
enc = rb_enc_find("UTF8-MAC");
|
||||
enc = rb_enc_find("UTF8-MAC");
|
||||
#else
|
||||
enc = rb_locale_encoding();
|
||||
enc = rb_default_external_encoding();
|
||||
#endif
|
||||
}
|
||||
return enc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue