mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
The previous version here was using UnicodeReader which was wrapping the UTF8Recoder class and passing that to csv.reader. It looks like the intention was to read a bytestream in a certain encoding and then reencode it to a different encoding. And then UnicodeReader creates unicode from the newly encoded stream. This is unnecssary, we know the encoding of the bytesstream and codec.getreader will happily consume the bytstream and give back unicode. The unicode can be fed directly into csv.writer. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>