Debian Codegraph @

upstream/debian-unstable/man1/encguess.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "ENCGUESS 1"
58 .TH ENCGUESS 1 2026-04-10 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 encguess \- guess character encodings of files
65 .SH VERSION
66 .IX Header "VERSION"
67 \&\f(CW$Id:\fR encguess,v 0.4 2023/11/10 01:10:50 dankogai Exp $
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& encguess [switches] filename...
72 .Ve
73 .SS SWITCHES
74 .IX Subsection "SWITCHES"
75 .IP \-h 2
76 .IX Item "-h"
77 show this message and exit.
78 .IP \-s 2
79 .IX Item "-s"
80 specify a list of "suspect encoding types" to test,
81 separated by either \f(CW\*(C`:\*(C'\fR or \f(CW\*(C`,\*(C'\fR
82 .IP \-S 2
83 .IX Item "-S"
84 output a list of all acceptable encoding types that can be used with
85 the \-s param
86 .IP \-u 2
87 .IX Item "-u"
88 suppress display of unidentified types
89 .SS EXAMPLES:
90 .IX Subsection "EXAMPLES:"
91 .IP \(bu 2
92 Guess encoding of a file named \f(CW\*(C`test.txt\*(C'\fR, using only the default
93 suspect types.
94 .Sp
95 .Vb 1
96 \& encguess test.txt
97 .Ve
98 .IP \(bu 2
99 Guess the encoding type of a file named \f(CW\*(C`test.txt\*(C'\fR, using the suspect
100 types \f(CW\*(C`euc\-jp,shiftjis,7bit\-jis\*(C'\fR.
101 .Sp
102 .Vb 2
103 \& encguess \-s euc\-jp,shiftjis,7bit\-jis test.txt
104 \& encguess \-s euc\-jp:shiftjis:7bit\-jis test.txt
105 .Ve
106 .IP \(bu 2
107 Guess the encoding type of several files, do not display results for
108 unidentified files.
109 .Sp
110 .Vb 1
111 \& encguess \-us euc\-jp,shiftjis,7bit\-jis test*.txt
112 .Ve
113 .SH DESCRIPTION
114 .IX Header "DESCRIPTION"
115 The encoding identification is done by checking one encoding type at a
116 time until all but the right type are eliminated. The set of encoding
117 types to try is defined by the \-s parameter and defaults to ascii,
118 utf8 and UTF\-16/32 with BOM. This can be overridden by passing one or
119 more encoding types via the \-s parameter. If you need to pass in
120 multiple suspect encoding types, use a quoted string with the a space
121 separating each value.
122 .SH "SEE ALSO"
123 .IX Header "SEE ALSO"
124 Encode::Guess, Encode::Detect
125 .SH "LICENSE AND COPYRIGHT"
126 .IX Header "LICENSE AND COPYRIGHT"
127 Copyright 2015 Michael LaGrasta and Dan Kogai.
128 .PP
129 This program is free software; you can redistribute it and/or modify it
130 under the terms of the Artistic License (2.0). You may obtain a
131 copy of the full license at:
132 .PP
133 <http://www.perlfoundation.org/artistic_license_2_0>