]> source.dussan.org Git - redmine.git/commitdiff
CSV import delimiter detection broken (#22583).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 24 Apr 2016 15:14:06 +0000 (15:14 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 24 Apr 2016 15:14:06 +0000 (15:14 +0000)
Patch by Jan Schulz-Hofen.

git-svn-id: http://svn.redmine.org/redmine/trunk@15357 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/import.rb

index 127f7be88f5fde01313137fbfa8860a90f03112d..22b90b6ac589b5387c85bc1cf47bc3815be5e7c6 100644 (file)
@@ -51,7 +51,7 @@ class Import < ActiveRecord::Base
     separator = lu(user, :general_csv_separator)
     if file_exists?
       begin
-        content = File.read(filepath, 256, "rb")
+        content = File.read(filepath, 256)
         separator = [',', ';'].sort_by {|sep| content.count(sep) }.last
       rescue Exception => e
       end