I have a csv file with characters like 'ø'. When I read the file with read(), the characters are not read correctly. Passing encoding='utf-8' to read() does not work. I have to use open() instead. open() works, but it's a bit inconvenient. I checked the source code, and it should be possible to add encoding support to read(): change with self.open(path, "rt") as f: to with self.open(path, "rt", encoding=encoding) as f:. But of course, it depends on how you want to handle this. I can open a PR if you want. @sfc-gh-jcarroll
I have a csv file with characters like 'ø'. When I read the file with
read()
, the characters are not read correctly. Passingencoding='utf-8'
to read() does not work. I have to useopen()
instead.open()
works, but it's a bit inconvenient. I checked the source code, and it should be possible to add encoding support toread()
: changewith self.open(path, "rt") as f:
towith self.open(path, "rt", encoding=encoding) as f:
. But of course, it depends on how you want to handle this. I can open a PR if you want. @sfc-gh-jcarroll