[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedSeptember 15, 2023

How to use iconv command in Linux.

How To Use Iconv Command.

iconv command is used to convert some text in one encoding into another encoding. If no input file is provided then it reads from standard input. Similarly, if no output file is given then it writes to standard output. If no from-encoding or to-encoding is provided then it uses current local’s character encoding.

Syntax:

iconv [options] [-f from-encoding] [-t to-encoding] [inputfile]...

Options:

  • -f from-encoding, –from-code=from-encoding : Use from-encoding for input characters.

  • -t to-encoding, –to-code=to-encoding : Use to-encoding for output characters.

  • -l, –list : List all known character set encodings.

  • -c : Silently discard characters that cannot be converted instead of terminating when encountering such characters.

  • -o outputfile, –output=outputfile : Use outputfile for output.

  • –verbose : Print progress information on standard error when processing multiple files.

Note:

  • If the string //IGNORE is appended to to-encoding, characters that cannot be converted are discarded and an error is printed after conversion.

  • If the string //TRANSLIT is appended to to-encoding, characters that cannot be represented in the target character set, it can be approximated through one or several similar looking characters.

Examples:

To convert from UTF-8 to ASCII :

echo abc ß ? € à?ç | iconv -f UTF-8 -t ASCII//TRANSLIT

Print the list of all character set encodings :

iconv -l

Reading and writing from a file :

iconv -f UTF-8 -t ASCII//TRANSLIT -o out.txt in.txt
Keep reading
How to use Cd Command.
May 11, 2023

How to use Cd Command.

This article will show you how to use the cd command to navigate your system’s directory tree. The cd (“change directory”) command is used to change the current working directory in Linux and other Unix-like operating systems. It is one of the most basic and frequently used commands when working…

Read article
How to Copy Files and Directories.
May 10, 2023

How to Copy Files and Directories.

How To Copy Files And Directories. It is common practice to use the cp command to copy files and rsync to copy directories. Copying files and directories is one of the most common tasks you’ll perform when working on the command line. There are several commands for copying files in Linux, with cp…

Read article
How to Clear (Flush) the DNS Cache on Windows, MacOS, and Linux
May 10, 2023

How to Clear (Flush) the DNS Cache on Windows, MacOS, and Linux

How To Clear (Flush) The DNS Cache On Windows, MacOS, And Linux This article provides instructions on how to flush the DNS cache on different operating systems and web browsers. DNS cache is a temporary database that stores information about previous DNS lookups. In other words, whenever you visit…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00