Last active
February 23, 2024 22:55
-
-
Save ppflrs/77965b375cad737d238e7667f5c3c609 to your computer and use it in GitHub Desktop.
Convert "application/octet-stream; charset=binary" to ASCII
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat $BIN_FILE | tr -d '\0' > $NEW_FILE |
It turned out this command fails at some files. Do you have ideas about why it works on some files and fails at others?
thanks man, is working for me... just stills giving some trash the output but almost all i need is there
i tried above and then ran $ file -bi file.out , still see "application/octet-stream; charset=binary" , please help
Doesn't work for me: tr -d \0 : command not found
I am trying to load some files from (on ubuntu20.04)
promptly : 2019/691-Modulo64/Modulo64/RECH0.csv
But in python (pandas module) i have an error :
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 442: invalid continuation byte
Please, any ideas.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome. It works. I downloaded a csv file from a database and I got all NA when I read it to python using pandas.read_csv function.
After I check the datatype of the file using this command: file -i , and found it is charset=binary but not ascii.