ENCGUESS(1perl)
π NAME π
okay so bestie, gather round β encguess is the tool that guesses character encodings of files. that's it, that's the whole job, and it eats every single time π
β¨ VERSION β¨
this is the version string, copied exactly because we do NOT play with provenance:
$Id: encguess,v 0.4 2023/11/10 01:10:50 dankogai Exp $
πΈ SYNOPSIS πΈ
the whole vibe in one line:
encguess [switches] filename...
like. give it some files, it tells you what encoding they're in. screaming, crying, throwing up, etc π
π SWITCHES π
-hβ show this message and exit. that's it, that's the help. bye π-sβ specify a list of "suspect encoding types" to test. separate them with either:or,β your call, icon status on both π«Ά-Sβ output a list of all acceptable encoding types that can be used with the-sparam. so like, if you don't know what to suspect, ask this first π-uβ suppress display of unidentified types. when a file is giving mystery, this keeps the mystery to itself π
π EXAMPLES: π
- guess the encoding of a file named
test.txt, using only the default suspect types:
encguess test.txt
- guess the encoding type of a file named
test.txt, using the suspect typeseuc-jp,shiftjis,7bit-jis:
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, and do NOT display results for unidentified files:
encguess -us euc-jp,shiftjis,7bit-jis test*.txt
π¦ DESCRIPTION π¦
so the way this works, bestie β the encoding identification is done by checking one encoding type at a time until all but the right type are eliminated. it's giving elimination round β¨ it's giving reality TV for encodings β¨
the set of encoding types it tries is defined by the -s parameter, and by default that's ascii, utf8, and UTF-16/32 with BOM. you can override that default by passing one or more encoding types via the -s parameter.
okay and this next part matters, don't skip it π if you need to pass in multiple suspect encoding types, use a quoted string with a space separating each value.
(yes yes, quoted string, spaces between the values β not commas, not colons, for that particular move. the -s flag itself still takes : or , for the list. iykwyk π
)
π SEE ALSO π
Encode::GuessEncode::Detect
both iconic, both worth a 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>
and that's the page, bestie β written against perl v5.44.0, dated 2026-10-17, filed under ENCGUESS(1perl). no cap, that's the whole manual. go guess some encodings πβ¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms