nerdexam
CompTIA

LX0-104 · Question #492

Which of the following commands can be used to convert text files in one character encoding to another character encoding?

The correct answer is D. iconv. The iconv command is the standard Linux utility for converting text files from one character encoding to another character encoding.

Shells, Scripting and Data Management

Question

Which of the following commands can be used to convert text files in one character encoding to another character encoding?

Options

  • Acat
  • Bconvert
  • Cdd
  • Diconv
  • Eutf2utf

How the community answered

(41 responses)
  • C
    2% (1)
  • D
    95% (39)
  • E
    2% (1)

Why each option

The iconv command is the standard Linux utility for converting text files from one character encoding to another character encoding.

Acat

cat is used to concatenate files and print their contents to standard output, without any character encoding conversion.

Bconvert

convert is typically part of ImageMagick and is used for image file format conversion, not text character encoding.

Cdd

dd is a low-level utility for copying and converting file data, but it's not primarily designed for character encoding conversion and iconv is the specialized and more flexible tool for this purpose.

DiconvCorrect

The iconv command is specifically designed for character set and encoding conversion of text files. It can convert between a wide range of encodings, such as UTF-8, ISO-8859-1, and UTF-16, making it the correct tool for this task.

Eutf2utf

utf2utf is not a standard or recognized command for character encoding conversion in Linux.

Concept tested: Character encoding conversion

Source: https://man7.org/linux/man-pages/man1/iconv.1.html

Topics

#character encoding#iconv#text file conversion

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice