Project

General

Profile

Actions

Bug #14253

closed

CSV.generate doesn't wrap a string anymore

Added by ahorek (Pavel Rosický) about 6 years ago. Updated over 5 years ago.

Status:
Closed
Target version:
-
[ruby-core:84542]

Description

Updated by hsbt (Hiroshi SHIBATA) about 6 years ago

  • Status changed from Open to Closed
  • Assignee set to kou (Kouhei Sutou)

Merged at https://github.com/ruby/csv/commit/75127b4ad00a748762effe9add3f91edeb0dc94f

It will merge ruby core repository until Ruby 2.6 releasing.

Updated by doda (Kouichi Iwamoto) over 5 years ago

Could you consider backporting this patch to 2.5?
The following code that generates a CSV file with a BOM does not work correctly with Ruby 2.5.

require 'csv'

csv_str = "\uFEFF" # BOM
CSV.generate(csv_str) do |csv|
  csv << ["列1", "列2", "列3"]
end

print csv_str
Actions

Also available in: Atom PDF

Like0
Like0Like0