i use the following code to generate a csv file. The code itself works. The problem are special chars / umlauts.
if i use :utf8 i get the file, but special chars like €, öäü are written like â‚¬, Ã¼, …
if i don´t use :utf8 it works as long as there are no special chars in a row like €, –, … . Then it breaks with the error
erlang error: :no_translation
file = File.open!(System.tmp_dir()<>"/"<>filename, [:write, :utf8]) users = get_users(conn, params) |> Repo.all |> CSV.encode(separator: ?;) |> Enum.each(&IO.write(file, &1))