Home > System Tutorial > LINUX > Introduction to iconv command under CentOS

Introduction to iconv command under CentOS

WBOY
Release: 2023-12-29 19:52:04
forward
1058 people have browsed it

iconv -f encoding [-t encoding] [inputfile]...

[Function]

Convert the contents of a given file from one encoding to another.

[describe]

-f encoding: Convert characters from encoding encoding.

-t encoding: Convert characters to encoding.

-l: List the known set of encoded characters

-o file: Specify the output file

-c: Ignore illegal characters in the output

-s: Suppress warning messages, but not error messages

--verbose: display progress information

The legal characters that can be specified by -f and -t are listed in the command with the -l option.

[Example]

*List currently supported character encodings:

[quietheart@lv-k test]$iconv -l

*Transcode the file file1 and output the converted file to fil2:

[quietheart@lv-k test]$iconv file1 -f EUC-JP-MS -t UTF-8 -o file2

Here, without -o, the output will be sent to standard output.

The above is the detailed content of Introduction to iconv command under CentOS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template