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