readtext ignores encoding when trying to read in a csv file (see SO). The problem is that in get_csv, the encodings "Latin-1", "UTF-8" are basically ignored since the argument is missing in the respective call to data.table::fread. This is not a problem on Linux and Mac as far as I can see since these OS have sensible defaults.
This PR adds the correct argument to data.table::fread and provides a simple fix for the problem.
Here is some code to reproduce the addressed problem (will only cause issues on Windows):
readtext
ignoresencoding
when trying to read in a csv file (see SO). The problem is that inget_csv
, the encodings "Latin-1", "UTF-8" are basically ignored since the argument is missing in the respective call todata.table::fread
. This is not a problem on Linux and Mac as far as I can see since these OS have sensible defaults.This PR adds the correct argument to
data.table::fread
and provides a simple fix for the problem.Here is some code to reproduce the addressed problem (will only cause issues on Windows):
Before:
After
Created on 2019-05-01 by the reprex package (v0.2.1)