You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the implementation for the PYTHONIOENCONDING environment variable is not complete.
Because, if these variable is set, all Python input should expected with these enconding, but the parameter --enconding also need be defined.
It's seems redundant.
For example both commands belows should be analogs and produce the same output.
$ PYTHONIOENCONDING=utf-16 csvstat ./examples/test_utf16_little.csv
$ csvstat --enconding utf-16 ./examples/test_utf16_little.csv
# Your file is not "utf-8-sig" encoded. Please specify the correct encoding with the -e flag or with the PYTHONIOENCODING environment variable. Use the -v flag to see the complete error.
But only the second works, the first responds with.
I'm understand that the sentence with the -e flag **or** with the PYTHONIOENCODING environment variable could replace the '--enconding' parameter.
Expected Behavior
The 'PYTHONIOENCODING' environment variable replace the '--environment' variable.
Actual Behavior
It seems the 'PYTHONIOENCODING' environment variable have no purpose
Steps
Execute a 'csvstat' command getting as input a 'no-utf-8' file with PYTHONIOENCONDING defined, it will fail.
$ PYTHONIOENCONDING=utf-16 csvstat ./examples/test_utf16_little.csv
# Your file is not "utf-8-sig" encoded. Please specify the correct encoding with the -e flag or with the PYTHONIOENCODING environment variable. Use the -v flag to see the complete error.
Input Data
Found in CSVKit source code: ./examples/test_utf16_little.csv
Stack trace
Versions
csvstat: 2.0.1
Python: 3.12.8
Operation System: Linux Debian 12.9
Additional information
Installed from source code with 'git clone' and 'pip -e'
The text was updated successfully, but these errors were encountered:
Issue
I think the implementation for the
PYTHONIOENCONDING
environment variable is not complete.Because, if these variable is set, all Python input should expected with these enconding, but the parameter
--enconding
also need be defined.It's seems redundant.
For example both commands belows should be analogs and produce the same output.
But only the second works, the first responds with.
I'm understand that the sentence
with the -e flag **or** with the PYTHONIOENCODING environment variable
could replace the '--enconding' parameter.Expected Behavior
The 'PYTHONIOENCODING' environment variable replace the '--environment' variable.
Actual Behavior
It seems the 'PYTHONIOENCODING' environment variable have no purpose
Steps
Execute a 'csvstat' command getting as input a 'no-utf-8' file with PYTHONIOENCONDING defined, it will fail.
Input Data
./examples/test_utf16_little.csv
Stack trace
Versions
Additional information
The text was updated successfully, but these errors were encountered: