ENCGUESSSection: Perl Programmers Reference Guide (1)
Index | Return to Main Contents
NAMEencguess - guess character encodings of files
VERSION$Id: encguess,v 0.2 2016/08/04 03:15:58 dankogai Exp $
encguess [switches] filename...
- show this message and exit.
- specify a list of ``suspect encoding types'' to test, seperated by either ":" or ","
- output a list of all acceptable encoding types that can be used with the -s param
- suppress display of unidentified types
Guess encoding of a file named "test.txt", using only the default
Guess the encoding type of a file named "test.txt", using the suspect
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
encguess -us euc-jp,shiftjis,7bit-jis test*.txt
DESCRIPTIONThe 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 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.
SEE ALSOEncode::Guess, Encode::Detect
LICENSE AND COPYRIGHTCopyright 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:
Return to Main Contents