From: Yui NARUSE Date: 2011-04-25T13:39:49+09:00 Subject: [ruby-core:35876] [Ruby 1.9 - Bug #4603] lib/csv.rb: when the :encoding parameter is not provided, the encoding of CSV data is treated as ASCII-8BIT Issue #4603 has been updated by Yui NARUSE. ruby -v changed from - to ruby 1.9.2p188 (2011-03-28 revision 31204) [x86_64-linux] ---------------------------------------- Bug #4603: lib/csv.rb: when the :encoding parameter is not provided, the encoding of CSV data is treated as ASCII-8BIT http://redmine.ruby-lang.org/issues/4603 Author: yu nobuoka Status: Assigned Priority: Normal Assignee: James Gray Category: lib Target version: 1.9.2 ruby -v: ruby 1.9.2p188 (2011-03-28 revision 31204) [x86_64-linux] This issue is involved in three methods, CSV::open, CSV::read and CSV::foreach. The document of CSV::read says "This method also understands an additional :encoding parameter that you can use to specify the Encoding of the data in the file to be read. You must provide this unless your data is in Encoding::default_external()." However, when the :encoding parameter is not provided, the encoding of the CSV data is treated as ASCII-8BIT. Not as Encoding.default_external. CSV::open and CSV::foreach are also similar. I think the actual behaviour of these methods doesn't conform to the document of these. -- http://redmine.ruby-lang.org