1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 12:44:55 +02:00
tldr/pages/common/enca.md
Marco Bonelli af602a181c
enca: clarify examples and fix tokens (#3214)
- Clarify and simplify examples' descriptions.
- Change the token {{files(s)}} to {{file1 file2 ...}} for consistency with
  other pages.
2019-08-03 11:01:48 +02:00

20 lines
591 B
Markdown

# enca
> Detect and convert the encoding of text files.
> More information: <https://github.com/nijel/enca>.
- Detect file(s) encoding according to the system's locale:
`enca {{file1 file2 ...}}`
- Detect file(s) encoding specifying a language in the POSIX/C locale format (e.g. zh_CN, en_US):
`enca -L {{language}} {{file1 file2 ...}}`
- Convert file(s) to a specific encoding:
`enca -L {{language}} -x {{to_encoding}} {{file1 file2 ...}}`
- Create a copy of an existing file using a different encoding:
`enca -L {{language}} -x {{to_encoding}} < {{original_file}} > {{new_file}}`