We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8d78ff9 + 9dea68a commit f1b113fCopy full SHA for f1b113f
1 file changed
lib/active_admin_import/model.rb
@@ -138,8 +138,10 @@ def define_methods_for(attr_name)
138
139
def encode(data)
140
data = content_encode(data) if force_encoding?
141
- data = data.encode('UTF-8',
142
- invalid: :replace, undef: :replace)
+ data = data.encode(
+ 'UTF-8',
143
+ invalid: :replace, undef: :replace, universal_newline: true
144
+ )
145
begin
146
data.sub("\xEF\xBB\xBF", '') # bom
147
rescue StandardError => _
0 commit comments