ENCGUESS(1)
โจ NAME โจ
encguess โ guess character encodings of files. This is the encguess(1) page from the Perl Programmers Reference Guide, and bestie, it's here to help you figure out what encoding a file is living in. ๐
๐ธ VERSION ๐ธ
Version info, preserved exactly: $Id: encguess,v 0.4 2023/11/10 01:10:50 dankogai Exp $.
๐ฆ SYNOPSIS ๐ฆ
encguess [switches] filename...
๐ SWITCHES ๐
-hโ show this message and exit. Slay. ๐-sโ specify a list of "suspect encoding types" to test, separated by either":"or",".-Sโ output a list of all acceptable encoding types that can be used with the-sparam.-uโ suppress display of unidentified types.
๐งช EXAMPLES ๐งช
- Guess encoding of a file named
test.txt, using only the default suspect types. Easy.
encguess test.txt
- Guess the encoding type of a file named
test.txt, using the suspect types"euc-jp,shiftjis,7bit-jis". Both of these are valid, bestie:
encguess -s euc-jp,shiftjis,7bit-jis test.txt
encguess -s euc-jp:shiftjis:7bit-jis test.txt
- Guess the encoding type of several files, do not display results for unidentified files. Iconic multi-file behavior. โจ
encguess -us euc-jp,shiftjis,7bit-jis test*.txt
๐ DESCRIPTION ๐
The encoding identification is done by checking one encoding type at a time until all but the right type are eliminated. That's the whole strategy, no cap. ๐ต๏ธโโ๏ธ
The set of encoding types to try is defined by the -s parameter and defaults to ascii, utf8 and UTF-16/32 with BOM. This can be overridden by passing one or more encoding types via the -s parameter.
If you need to pass in multiple suspect encoding types, use a quoted string with the a space separating each value. Yes, that's the wording โ keep it cute and keep it exact. ๐
๐ SEE ALSO ๐
Encode::Guess, Encode::Detect โ go give them a little look. ๐
๐ LICENSE AND COPYRIGHT ๐
Copyright 2015 Michael LaGrasta and Dan Kogai.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License (2.0). You may obtain a copy of the full license at:
<http://www.perlfoundation.org/artistic_license_2_0>
Page source/version check: perl v5.42.3, dated 2026-11-03. Bye bestie, go guess those encodings! ๐ซถ๐
๐ฆ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms