Tip (I already fixed it locally):
Does not behave the same on windows and linux, because it uses the default platform encoding (which is not UTF-8 on windows). => bug, especially since CSV is always written in UTF-8 in the other code.

Furthermore, the reader might not be closed => memory leak.