How To Install utfcheck on Debian 10

Learn how to install utfcheck on Debian 10 with this tutorial. utfcheck is check validity of UTF-8 and ASCII files

Introduction

In this tutorial we learn how to install utfcheck on Debian 10.

What is utfcheck

utfcheck is:

The utfcheck program examines a text file and prints a summary of what the file contains: ASCII, UTF-8, UTF-16 (either big-endian or little-endian based on an initial Byte Order Mark), or binary data. ASCII and UTF-8 files are processed further; UTF-16 and binary files are not. For a UTF-8 file, the summary includes whether or not the file begins with the Unicode Byte Order Mark (U+FEFF). Any following data encountered that is not well-formed ASCII or UTF-8 Unicode is considered to be binary data; upon reading such data the input file is considered not to be a proper text file and the program exits with an error status.

The utfcheck program returns an exit status of EXIT_SUCCESS if the text file was well-formed, and EXIT_FAILURE otherwise.

There are three methods to install utfcheck on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install utfcheck Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install utfcheck using apt-get by running the following command:

sudo apt-get -y install utfcheck

Install utfcheck Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install utfcheck using apt by running the following command:

sudo apt -y install utfcheck

Install utfcheck Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install utfcheck using aptitude by running the following command:

sudo aptitude -y install utfcheck

How To Uninstall utfcheck on Debian 10

To uninstall only the utfcheck package we can use the following command:

sudo apt-get remove utfcheck

Uninstall utfcheck And Its Dependencies

To uninstall utfcheck and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove utfcheck

Remove utfcheck Configurations and Data

To remove utfcheck configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge utfcheck

Remove utfcheck configuration, data, and all of its dependencies

We can use the following command to remove utfcheck configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge utfcheck

Dependencies

utfcheck have the following dependencies:

References

Summary

In this tutorial we learn how to install utfcheck package on Debian 10 using different package management tools: apt, apt-get and aptitude.