CP1251
(Windows-1251, Cyrillic), UTF-8
, ISO-8859-1
and ASCII
charsets.Option | Description |
---|---|
-b , --brief | Don’t print filename (brief mode) |
-i , --mime | Print filetype and encoding |
in.txt
:Option | Description |
---|---|
-f , --from-code | Convert a file’s encoding from charset |
-t , --to-code | Convert a file’s encoding to charset |
-o , --output | Specify output file (instead of stdout) |
CP1251
(Windows-1251, Cyrillic) charset to UTF-8
:ISO-8859-1
charset to < />< code=' /> and save it to out.txt
:< />ASCII
to UTF-8
:UTF-8
charset to ASCII
:iconv
will generate the error message “illegal input sequence at position” unless you tell it to strip all non-ASCII characters using the -c
option.Option | Description |
---|---|
-c | Omit invalid characters from the output |
iconv
with the -c
option, nonconvertible characters will be lost.CP1251
(Windows-1251, Cyrillic) charset to UTF-8
with:Option | Description |
---|---|
-l , --list | List known charsets |