Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--help should document options to --encoding #1117

Closed
mtfurlan opened this issue Apr 16, 2021 · 5 comments
Closed

--help should document options to --encoding #1117

mtfurlan opened this issue Apr 16, 2021 · 5 comments

Comments

@mtfurlan
Copy link

I just ran into an issue with csvjoin 1.0.5 where a file was failing to parse because

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc1 in position 377: invalid start byte

It didn't like Á.

In the end the solution was --encoding iso-8859-1, but it was really frustrating that the help said there was an encoding flag and nothing about how to use it.

@jpmckinney
Copy link
Member

Right now the --help has:

-e ENCODING, --encoding ENCODING
                      Specify the encoding of the input CSV file.

What do you suggest it say?

@mtfurlan
Copy link
Author

Either have a list of formats in the help there, or add a way to list formats.

  • ffmpeg has -formats
  • convert does -list formats

I think --encoding with no argument would be most reasonable, but also not as easy as just putting the list in the help.

@jpmckinney
Copy link
Member

In the meantime, you can refer to the available encodings in Python here: https://docs.python.org/3/library/codecs.html#standard-encodings

@jpmckinney
Copy link
Member

Python apparently has no easy way to report the available encodings on a given platform.

I instead just added a link to those docs from https://csvkit.readthedocs.io/en/latest/common_arguments.html

@mtfurlan
Copy link
Author

Cool, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants