File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,9 @@ namespace :heliotrope do
34
34
fail "CSV file may accidentally be a backup as '#{ input_file } ' contains 'bak'. Exiting." if input_file . include? 'bak'
35
35
36
36
puts "Parsing file: #{ input_file } "
37
- # we need UTF-8 and TMM needs to export UTF-16LE for now because of this kind of thing: https://dba.stackexchange.com/a/250018
38
- # unfortunately we need to read this file into memory to force uniform line endings before parsing the CSV.
39
- # side note: although the
40
- file_content = File . read ( input_file , encoding : 'bom|utf-16le' )
37
+ # Firebrand are finally good with UTF8. Note that it's crucial for Ruby to know there's a BOM or the first column is lost.
38
+ # Unfortunately we need to read this file into memory to force uniform line endings before parsing the CSV.
39
+ file_content = File . read ( input_file , encoding : 'bom|utf-8' )
41
40
# Use `gsub!` to avoid holding more memory (I guess).
42
41
file_content . gsub! ( /\r \n ?/ , "\n " )
43
42
You can’t perform that action at this time.
0 commit comments