mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-21 15:51:05 +00:00
Update cheatsheets
This commit is contained in:
25
enca
Normal file
25
enca
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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 {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Detect file(s) encoding specifying a language in the POSIX/C locale format (e.g. zh_CN, en_US):
|
||||
|
||||
`enca -L {{language}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Convert file(s) to a specific encoding:
|
||||
|
||||
`enca -L {{language}} -x {{to_encoding}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Create a copy of an existing file using a different encoding:
|
||||
|
||||
`enca -L {{language}} -x {{to_encoding}} < {{original_file}} > {{new_file}}`
|
||||
Reference in New Issue
Block a user