Defect #22583 ยป fix_csv_autodetection.patch
| app/models/import.rb | ||
|---|---|---|
| 51 | 51 |
separator = lu(user, :general_csv_separator) |
| 52 | 52 |
if file_exists? |
| 53 | 53 |
begin |
| 54 |
content = File.read(filepath, 256, "rb")
|
|
| 54 |
content = File.read(filepath, 256) |
|
| 55 | 55 |
separator = [',', ';'].sort_by {|sep| content.count(sep) }.last
|
| 56 | 56 |
rescue Exception => e |
| 57 | 57 |
end |