Download this file

unaccent.1    116 lines (102 with data), 2.7 kB

  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
'''
''' Copyright (C) 2000, 2001, 2002 Loic Dachary <loic@senga.org>
'''
''' This program is free software; you can redistribute it and/or modify
''' it under the terms of the GNU General Public License as published by
''' the Free Software Foundation; either version 2 of the License, or
''' (at your option) any later version.
'''
''' This program is distributed in the hope that it will be useful,
''' but WITHOUT ANY WARRANTY; without even the implied warranty of
''' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
''' GNU General Public License for more details.
'''
''' You should have received a copy of the GNU General Public License
''' along with this program; if not, write to the Free Software
''' Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'''
.TH unaccent 1 local
.SH NAME
unaccent \- remove accents from input stream or a string
.SH SYNOPSIS
unaccent [--debug_low] [--debug_high] [-h] charset [string] [expected]
.SH DESCRIPTION
With a single argument,
.I unaccent
reads data from stdin, replaces accented letters by their unaccented
equivalent and writes the result on stdout.
If the second argument
.B ('string')
is provided
.I unaccent
transforms it by replacing accented letters by their unaccented
equivalent. The
result is printed on the standard output.
The charset of the input
string or the data read from stdin is specified by the
.B 'charset'
argument (ISO-8859-15 for instance). The output is printed using the same charset.
.P
If the
.B 'expected'
argument is provided, the output string is compared to it. If they
are not equal
.I unaccent
exits on error.
.P
.I unaccent
relies on the
.B iconv(3)
library to convert from the specified charset to UTF-16BE (or UTF-16
if UTF-16BE is not available). You should check the manual pages for
available charsets. On GNU/Linux the command
.nf
.ft CW
iconv -l
.ft R
.fi
shows all available charsets.
.SH OPTIONS
.TP
.B --debug_low
Prints human readable information about the unaccentuation process. See
.B unac(3)
for more information.
.TP
.B --debug_high
Prints very detailed information about the unaccentuation process.
See
.B unac(3)
for more information.
.TP
.B --help -h
Prints a short usage and exits.
.SH EXAMPLES
Remove accents from the string
.B �t�
and check that the result is
.B ete.
.nf
.ft CW
unaccent ISO-8859-1 �t� ete
.ft R
.fi
.P
Remove accents from file
.B myfile
and put the result in file
.B myfile.unaccent
.nf
.ft CW
unaccent ISO-8859-1 < myfile > myfile.unaccent
.ft R
.fi
.SH SEE ALSO
unac(3), iconv(3)
.SH AUTHOR
Loic Dachary loic@senga.org
.nf
.ft CW
http://www.senga.org/unac/
.ft R
.fi