System Grab Bag

View all man pages from Ubuntu (or from all projects)
'br\} 'br\} 

Name

encguess - guess character encodings of files

Version

\&\f(CW$Id: encguess,v 0.3 2020/12/02 01:28:17 dankogai Exp dankogai $

Synopsis

\& encguess [switches] filename...

\S-1Switches\S0

show this message and exit.

specify a list of \*(L"suspect encoding types\*(R" to test, separated by either \f(CW\*(C`:\*(C' or \f(CW\*(C`,\*(C'

output a list of all acceptable encoding types that can be used with the -s param

suppress display of unidentified types

\S-1Examples:\S0

Guess encoding of a file named \f(CW\*(C`test.txt\*(C', using only the default suspect types. \& encguess test.txt

Guess the encoding type of a file named \f(CW\*(C`test.txt\*(C', using the suspect types \f(CW\*(C`euc-jp,shiftjis,7bit-jis\*(C'. \& 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. \& 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. The set of encoding types to try is defined by the -s parameter and defaults to ascii, utf8 and \s-1UTF-16/32\s0 with \s-1BOM.\s0 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.

See Also

Encode::Guess, Encode::Detect

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 the Artistic License (2.0). You may obtain a copy of the full license at:

<http://www.perlfoundation.org/artistic_license_2_0>