ruby-changes:14961
From: naruse <ko1@a...>
Date: Sun, 7 Mar 2010 02:11:45 +0900 (JST)
Subject: [ruby-changes:14961] Ruby:r26832 (trunk): * encoding.c (enc_set_filesystem_encoding):
naruse 2010-03-07 02:11:28 +0900 (Sun, 07 Mar 2010) New Revision: 26832 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26832 Log: * encoding.c (enc_set_filesystem_encoding): filesystem encoding on Mac OS X is now default external encoding. so Mac OS X is now treated as one of Unix. [ruby-dev:40439] * file.c (file_path_convert): ditto. Modified files: trunk/ChangeLog trunk/encoding.c trunk/file.c Index: encoding.c =================================================================== --- encoding.c (revision 26831) +++ encoding.c (revision 26832) @@ -1147,8 +1147,6 @@ snprintf(cp, sizeof cp, "CP%d", AreFileApisANSI() ? GetACP() : GetOEMCP()); idx = rb_enc_find_index(cp); if (idx < 0) idx = rb_ascii8bit_encindex(); -#elif defined __APPLE__ - idx = rb_utf8_encindex(); #else idx = rb_enc_to_index(rb_default_external_encoding()); #endif Index: ChangeLog =================================================================== --- ChangeLog (revision 26831) +++ ChangeLog (revision 26832) @@ -1,3 +1,12 @@ +Sun Mar 7 02:05:38 2010 NARUSE, Yui <naruse@r...> + + * encoding.c (enc_set_filesystem_encoding): + filesystem encoding on Mac OS X is now + default external encoding. so Mac OS X is now + treated as one of Unix. [ruby-dev:40439] + + * file.c (file_path_convert): ditto. + Sat Mar 6 22:07:09 2010 Tanaka Akira <akr@f...> * pack.c: fix the prototype of rb_big2ulong_pack. Index: file.c =================================================================== --- file.c (revision 26831) +++ file.c (revision 26832) @@ -109,16 +109,6 @@ #ifndef _WIN32 /* non Windows == Unix */ rb_encoding *fname_encoding = rb_enc_from_index(ENCODING_GET(name)); rb_encoding *fs_encoding; -# ifdef __APPLE__ - /* Mac OS X's file system encoding is UTF-8 */ - if (rb_usascii_encoding() != fname_encoding - && rb_ascii8bit_encoding() != fname_encoding - && (fs_encoding = rb_filesystem_encoding()) != fname_encoding - && rb_enc_find("UTF8-MAC") != fname_encoding) { - /* Don't call rb_enc_find() before UTF-8 */ - name = rb_str_conv_enc(name, fname_encoding, fs_encoding); - } -# else /* Unix other than Mac OS X */ if (rb_default_internal_encoding() != NULL && rb_usascii_encoding() != fname_encoding && rb_ascii8bit_encoding() != fname_encoding @@ -126,7 +116,6 @@ /* Don't call rb_filesystem_encoding() before US-ASCII and ASCII-8BIT */ name = rb_str_conv_enc(name, fname_encoding, fs_encoding); } -# endif #endif return name; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/