This command:
iconv -f utf-8 -t utf-8 -c file.txt
will clean up your UTF-8 file, skipping all the invalid characters.
-f is the source format
-t the target format
-c skips any invalid sequence
More Related Contents:
- how to detect invalid utf8 unicode/binary in a text file
- create a file with prefix =file1 followed by the random number
- How to read a file line by line and making a new file for each line having same filename as last word of each line? [closed]
- Why to code a script which will check if some package is installed in linux and if not then install it?
- Read values into a shell variable from a pipe
- Aborting a shell script if any command returns a non-zero value
- Fastest way to find lines of a file from another larger file in Bash
- Use sudo with password as parameter [closed]
- Shell script: Run function from script over ssh
- What is the difference between using `sh` and `source`?
- Setting environment variables in Linux using Bash
- Get the Perl rename utility instead of the built-in rename
- Automating telnet session using bash scripts
- Run a shell command when a file is added
- How do I syntax check a Bash script without running it?
- how to get MouseMove and MouseClick in bash?
- Find the files that have been changed in last 24 hours
- Tar a directory, but don’t store full absolute paths in the archive
- Bash script execution with and without shebang in Linux and BSD
- Variable in Bash Script that keeps it value from the last time running
- bash command not found when setting a variable
- How to obtain the number of CPUs/cores in Linux from the command line?
- How do I get cURL to not show the progress bar?
- Move all files except one
- Linux: remove file extensions for multiple files
- Joining multiple fields in text files on Unix
- Run script with rc.local: script works, but not at boot
- Maximum number of Bash arguments != max num cp arguments?
- Write a bash shell script that consumes a constant amount of RAM for a user defined time [closed]
- Using “$RANDOM” to generate a random string in Bash