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