java -jar enctool.jar
java -jar enctool.jar myFile.txt
OR
java -jar enctool.jar -e myFile.txt
This command will display encoding with the highest level of confidence.
java -jar enctool.jar -r myDirectory
This command work recursively in the directory.
java -jar enctool.jar -r -p .*\.java myDirectory
In this example, only *.java files are analyzed.
The pattern filter must be a regular Expression.
java -jar enctool.jar -r -d ISO-8859-1 myDirectory
java -jar enctool.jar -c UTF-8 myFile.txt
Encoding of "myFile.txt" is detected and converted to UTF-8.
To force input encoding, use "-f" option :
java -jar enctool.jar -c UTF-8 -f ISO-8859-1 myFile.txt
java -jar enctool.jar -cr UTF-8 -p .*\.java myDirectory