ENCGUESS(1perl)

πŸ“¦
version 5.44.0 Β· 2 versions
, in arch rolling

πŸ’– 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 -s param. 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 types euc-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::Guess
  • Encode::Detect

both iconic, both worth a look 🫢


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