tldr/pages/common/iconv.md

17 lines
405 B
Markdown
Raw Normal View History

2014-09-03 21:21:30 +01:00
# iconv
> Convert text from one encoding to another.
> More information: <https://manned.org/iconv>.
2014-09-03 21:21:30 +01:00
- Convert file to a specific encoding, and print to `stdout`:
2014-09-03 21:21:30 +01:00
`iconv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}`
- Convert file to the current locale's encoding, and output to a file:
2014-09-03 21:21:30 +01:00
`iconv -f {{from_encoding}} {{input_file}} > {{output_file}}`
- List supported encodings:
2014-09-03 21:21:30 +01:00
`iconv -l`