wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
5.9k stars 605 forks source link

'gbk' codec can't encode character '\xc1' #1227

Closed RaidOpe closed 6 months ago

RaidOpe commented 6 months ago

UnicodeEncodeError: 'gbk' codec can't encode character '\xc1' in position 6: illegal multibyte sequence

Á doesn't seem to be decoded by utf-8, I use the following command

in2csv -e utf-8 text2.xlsx > 2.csv

Its stdout will not be interrupted, but it seems that redirection will be interrupted, and the csv file is incomplete.

in2csv -e iso-8859-1 text2.xlsx > 2.csv same too

RaidOpe commented 6 months ago

这是个例子

1 2 3
RENOVÁVEL RENOVÁVEL RENOVÁVEL
RENOVÁVEL RENOVÁVEL RENOVÁVEL
RENOVÁVEL RENOVÁVEL RENOVÁVEL
RaidOpe commented 6 months ago

https://github.com/wireservice/csvkit/issues/1098#issuecomment-739669143

I‘ll close it