* 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
@ -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>
|
Thu Aug 14 20:58:57 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (rb_econv_open_by_transcoder_entries): renamed from
|
* 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)
|
dir_initialize(int argc, VALUE *argv, VALUE dir)
|
||||||
{
|
{
|
||||||
struct dir_data *dp;
|
struct dir_data *dp;
|
||||||
static rb_encoding *fs_encoding;
|
|
||||||
rb_encoding *extencoding;
|
rb_encoding *extencoding;
|
||||||
VALUE dirname, opt;
|
VALUE dirname, opt;
|
||||||
static VALUE sym_extenc;
|
static VALUE sym_extenc;
|
||||||
|
|
||||||
if (!sym_extenc) {
|
if (!sym_extenc) {
|
||||||
sym_extenc = ID2SYM(rb_intern("external_encoding"));
|
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);
|
rb_scan_args(argc, argv, "11", &dirname, &opt);
|
||||||
|
|
||||||
if (!NIL_P(opt)) {
|
if (!NIL_P(opt)) {
|
||||||
|
@ -962,16 +962,14 @@ rb_locale_encoding(void)
|
|||||||
rb_encoding *
|
rb_encoding *
|
||||||
rb_filesystem_encoding(void)
|
rb_filesystem_encoding(void)
|
||||||
{
|
{
|
||||||
static rb_encoding *enc;
|
rb_encoding *enc;
|
||||||
if (!enc) {
|
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
enc = rb_locale_encoding();
|
enc = rb_locale_encoding();
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
enc = rb_enc_find("UTF8-MAC");
|
enc = rb_enc_find("UTF8-MAC");
|
||||||
#else
|
#else
|
||||||
enc = rb_locale_encoding();
|
enc = rb_default_external_encoding();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
return enc;
|
return enc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user