-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
Hi there I update my app to ruby-2.5 and have some problems with sending encoding bom|utf-8
to csv parser.
I create a sample Dockerfiles for this:
With ruby-2.4.3
everything working fine:
FROM ruby:2.4.3
RUN echo 'test' > test.csv
RUN echo "require 'csv'\ncsv = CSV.read('test.csv', encoding: 'bom|utf-8')\n p csv[0][0]" > script.rb
CMD ruby script.rb
output is "test"
But for ruby-2.5.0 encoding error is happend
FROM ruby:2.5.0
RUN echo 'test' > test.csv
RUN echo "require 'csv'\ncsv = CSV.read('test.csv', encoding: 'bom|utf-8')\n p csv[0][0]" > script.rb
CMD ruby script.rb
Error is:
/usr/local/lib/ruby/2.5.0/csv.rb:1532:in `find': unknown encoding name - bom|utf-8 (ArgumentError)
from /usr/local/lib/ruby/2.5.0/csv.rb:1532:in `initialize'
from /usr/local/lib/ruby/2.5.0/csv.rb:1280:in `new'
from /usr/local/lib/ruby/2.5.0/csv.rb:1280:in `open'
from /usr/local/lib/ruby/2.5.0/csv.rb:1346:in `read'
from script.rb:2:in `<main>'
khiav223577 and grvm
Metadata
Metadata
Assignees
Labels
No labels