GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ENCGUESS(1) Perl Programmers Reference Guide ENCGUESS(1)

encguess - guess character encodings of files

$Id: encguess,v 0.3 2020/12/02 01:28:17 dankogai Exp dankogai $

  encguess [switches] filename...

-h
show this message and exit.
-s
specify a list of "suspect encoding types" to test, separated 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

  • Guess 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, do not display results for unidentified files.

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

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.

Encode::Guess, Encode::Detect

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>

2022-04-08 perl v5.34.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.