Project

General

Profile

Actions

Bug #4603

closed

lib/csv.rb: when the :encoding parameter is not provided, the encoding of CSV data is treated as ASCII-8BIT

Added by nobuoka (yu nobuoka) over 13 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
ruby -v:
-
Backport:
[ruby-core:35866]

Description

=begin
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.
=end


Files

csv_test.rb (814 Bytes) csv_test.rb nobuoka (yu nobuoka), 04/24/2011 03:33 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0