# man > encguess(1)

---
type: CommandReference
command: encguess
mode: man
section: 1
source: perldoc
---

## Quick Reference

- `encguess test.txt` — guess encoding of a file using default suspects
- `encguess -s euc-jp,shiftjis,7bit-jis test.txt` — specify suspect encoding types (comma-separated)
- `encguess -s euc-jp:shiftjis:7bit-jis test.txt` — specify suspect encoding types (colon-separated)
- `encguess -us euc-jp,shiftjis,7bit-jis test*.txt` — suppress unidentified files and use custom suspects
- `encguess -S` — list all acceptable encoding types for the `-s` parameter

## Name

`encguess` — guess character encodings of files

## Synopsis

shell
encguess [switches] filename...
## Options

- `-h` — show help message and exit
- `-s` — specify a list of suspect encoding types to test, separated by `:` or `,`
- `-S` — output a list of all acceptable encoding types that can be used with `-s`
- `-u` — suppress display of unidentified types

## Examples

Guess encoding of a file using the default suspect types (ascii, utf8, UTF-16/32 with BOM):

shell
encguess test.txt
Guess encoding using custom suspect types:

shell
encguess -s euc-jp,shiftjis,7bit-jis test.txt
encguess -s euc-jp:shiftjis:7bit-jis test.txt
Guess encoding for multiple files, hiding results for unidentified files:

shell
encguess -us euc-jp,shiftjis,7bit-jis test*.txt
## See Also

- [Encode::Guess](https://www.chedong.com/phpMan.php/perldoc/Encode%3A%3AGuess/markdown)
- [Encode::Detect](https://www.chedong.com/phpMan.php/perldoc/Encode%3A%3ADetect/markdown)