ruby-changes:12510
From: naruse <ko1@a...>
Date: Mon, 20 Jul 2009 20:37:44 +0900 (JST)
Subject: [ruby-changes:12510] Ruby:r24213 (trunk): * io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom.
naruse 2009-07-20 20:37:26 +0900 (Mon, 20 Jul 2009) New Revision: 24213 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24213 Log: * io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24212) +++ ChangeLog (revision 24213) @@ -1,3 +1,7 @@ +Mon Jul 20 20:35:55 2009 NARUSE, Yui <naruse@r...> + + * io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom. + Mon Jul 20 19:00:58 2009 Nobuyoshi Nakada <nobu@r...> * compile.c (compile_dstr_fragments): reduced needless literal. Index: io.c =================================================================== --- io.c (revision 24212) +++ io.c (revision 24213) @@ -5467,6 +5467,9 @@ * read string will be tagged by the encoding in reading, * and output string will be converted * to the specified encoding in writing. + * If ext_enc ends with '-bom', check whether the input has a BOM. If + * there is a BOM, strip it and set external encoding as + * what the BOM tells. If there is no BOM, use ext_enc without '-bom'. * If two encoding names, * ext_enc and int_enc (external encoding and internal encoding), * are specified, the read string is converted from ext_enc -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/