Permalink
Browse files

mod_import_csv: Correctly treat .csv files as UTF-8

  • Loading branch information...
1 parent d9d10e0 commit 09c3d9c5b715a90670986f11364fecad5b79c9a4 @arjan arjan committed Mar 27, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/mod_import_csv/support/import_csv.erl
@@ -40,7 +40,7 @@
import(Def, Context) ->
StartDate = erlang:localtime(),
%% Read all rows
- {ok, Device} = file:open(Def#filedef.filename, [read, binary]),
+ {ok, Device} = file:open(Def#filedef.filename, [read, binary, {encoding, utf8}]),
Rows = parse_csv:scan_lines(Device, Def#filedef.colsep),
file:close(Device),
file:delete(Def#filedef.filename),

0 comments on commit 09c3d9c

Please sign in to comment.