зеркало из https://github.com/github/ruby.git
* encoding.c (rb_filesystem_encoding): defined.
* include/ruby/encoding.h (rb_filesystem_encoding): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
aaf1b72873
Коммит
2755479bd9
|
@ -1,3 +1,9 @@
|
|||
Tue Jun 17 06:26:28 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* encoding.c (rb_filesystem_encoding): defined.
|
||||
|
||||
* include/ruby/encoding.h (rb_filesystem_encoding): added.
|
||||
|
||||
Tue Jun 17 06:24:28 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/syck/rubyext.c: add encoding header.
|
||||
|
|
16
encoding.c
16
encoding.c
|
@ -962,6 +962,22 @@ rb_locale_encoding(void)
|
|||
return rb_enc_from_index(idx);
|
||||
}
|
||||
|
||||
rb_encoding *
|
||||
rb_filesystem_encoding(void)
|
||||
{
|
||||
static rb_encoding *enc;
|
||||
if (!enc) {
|
||||
#if defined _WIN32
|
||||
enc = rb_locale_encoding();
|
||||
#elif defined __APPLE__
|
||||
enc = rb_enc_find("UTF8-MAC");
|
||||
#else
|
||||
enc = rb_ascii8bit_encoding();
|
||||
#endif
|
||||
}
|
||||
return enc;
|
||||
}
|
||||
|
||||
static int default_external_index;
|
||||
|
||||
rb_encoding *
|
||||
|
|
|
@ -165,6 +165,7 @@ rb_encoding *rb_ascii8bit_encoding(void);
|
|||
rb_encoding *rb_utf8_encoding(void);
|
||||
rb_encoding *rb_usascii_encoding(void);
|
||||
rb_encoding *rb_locale_encoding(void);
|
||||
rb_encoding *rb_filesystem_encoding(void);
|
||||
rb_encoding *rb_default_external_encoding(void);
|
||||
int rb_usascii_encindex(void);
|
||||
int rb_ascii8bit_encindex(void);
|
||||
|
|
Загрузка…
Ссылка в новой задаче