summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-20 11:37:26 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-20 11:37:26 +0000
commit92bade722b1cd2b731302dca51d020a1f2b4e313 (patch)
tree70df3bdbe1900e289c243019dd06dd8bcb069cca
parent864a7edc4902e07108de1f5d242484497a2e0011 (diff)
downloadruby-92bade722b1cd2b731302dca51d020a1f2b4e313.tar.gz
ruby-92bade722b1cd2b731302dca51d020a1f2b4e313.tar.xz
ruby-92bade722b1cd2b731302dca51d020a1f2b4e313.zip
* io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e61d7ccc..855dd70cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jul 20 20:35:55 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom.
+
Mon Jul 20 19:00:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* compile.c (compile_dstr_fragments): reduced needless literal.
diff --git a/io.c b/io.c
index 44f79a735..d9fd15744 100644
--- a/io.c
+++ b/io.c
@@ -5467,6 +5467,9 @@ check_pipe_command(VALUE filename_or_command)
* 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