Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

encguess (1)

Name

encguess - guess character encodings of files

Synopsis

encguess [switches] filename...

SWITCHES
-h
show this message and exit.

-s
specify a list of "suspect encoding types" to test, seperated by
either ":" or ","

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

-u
suppress display of unidentified types

EXAMPLES:
o Guess encoding of a file named "test.txt", using only the default
suspect types.

encguess test.txt

o 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

o Guess the encoding type of several files, do not display results for
unidentified files.

encguess -us euc-jp,shiftjis,7bit-jis test*.txt

Description

Perl Programmers Reference Guide                                   ENCGUESS(1)



NAME
       encguess - guess character encodings of files

VERSION
       $Id: encguess,v 0.2 2016/08/04 03:15:58 dankogai Exp $

SYNOPSIS
         encguess [switches] filename...

   SWITCHES
       -h
         show this message and exit.

       -s
         specify a list of "suspect encoding types" to test, seperated by
         either ":" or ","

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

       -u
         suppress display of unidentified types

   EXAMPLES:
       o Guess encoding of a file named "test.txt", using only the default
         suspect types.

            encguess test.txt

       o 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

       o 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 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.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+-----------------------+
       |ATTRIBUTE TYPE |   ATTRIBUTE VALUE     |
       +---------------+-----------------------+
       |Availability   | runtime/perl-532      |
       +---------------+-----------------------+
       |Stability      | Pass-through volatile |
       +---------------+-----------------------+

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>



NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://www.cpan.org/src/5.0/perl-5.32.0.tar.gz.

       Further information about this software can be found on the open source
       community website at https://www.perl.org/.



perl v5.32.0                      2022-06-28                       ENCGUESS(1)