[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#309846: locales: new localedef.1 manual page



Package: locales
Version: 2.3.5-2

Attached is a new version of the localedef.1 manual page
(debian/local/manpages/localedef.1) and a diff against the previous
version (the former is there so that people who want to review it can
more easily get a complete version).

I have added descriptions of options that were missing (presumably added
since the manual page was originally written years ago), and clarified
the behavior in general. I hope it is complete and correct, but it might
not be. I had to read through the source and experiment, and I may have
overlooked or misinterpreted something. Should be better than the
current version, however.

Hopefully this is useful. Happy hacking.

.TH LOCALEDEF 1 "May 20, 2005"
.SH NAME
localedef \- compile locale definition files
.SH SYNOPSIS
.ad l
.nh
.B localedef
.RI [ options ]
.I outputpath
.br
.B "localedef \-\-list\-archive"
.RI [ options ]
.br
.B "localedef \-\-delete\-from\-archive"
.RI [ options ]
.IR localename " ..."
.br
.B "localedef \-\-add\-to\-archive"
.RI [ options ]
.IR compiledpath
.br
.B "localedef \-\-version"
.br
.B "localedef \-\-help"
.br
.B "localedef \-\-usage"
.ad b
.hy
.SH DESCRIPTION
The
.B localedef
program reads the indicated
.I charmap
and
.I input
files, compiles them to a binary form quickly usable by the
.BR locale (7)
functions in the C library, and places the output in 
.IR outputpath .
.PP
If
.I outputpath
contains a slash character ('/'), it is directly the name of the output
directory.
In this case, there is a separate output file for each locale category
(LC_CTIME, LC_NUMERIC, and so on).
.PP
Otherwise, if the 
.B \-\-no\-archive
option is used,
.I outputpath
is the name of a subdirectory in
.B /usr/lib/locale
where per-category compiled files are placed.
.PP
Otherwise, 
.I outputpath
is the name of a locale and the compiled locale data is added to the
archive file 
.BR /usr/lib/locale/locale-archive .
.PP
If no
.I charmapfile
is given, the value
.I POSIX
is used by default.
If no
.I inputfile
is given, or if it is given as a dash
.RB ( \- ),
.B localedef
reads from standard input.
.SH OPTIONS
Most options can have either short or long forms.  If multiple short
options are used, they can be combined in one word (for example,
.B \-cv 
is identical to
.BR "\-c \-v" ).
.PP
If a short option takes an argument, the argument can be given separately
as the next word
.RB ( "\-f foo" ), 
or it can be written together with the option letter
.RB ( \-ffoo ).
If a long option takes an argument, the argument can be given separately
as the next word, or it can be written as option=argument 
.RB ( \-\-charmap=foo ).
.SS "Operation selection options"
A few options direct 
.B localedef
to do something else than compile locale definitions.
Only one of these should be used at a time.
.TP
.B \-\-delete\-from\-archive
Delete the named locales from the locale archive file.
.TP
.B \-\-list\-archive
List the locales contained in the locale archive file.
.TP
.B \-\-add\-to\-archive
Add the 
.I compiledpath
directories to the locale archive file.
The directories should have been created by previous runs of 
.BR localedef ,
using 
.BR \-\-no\-archive .
.SS "Other options"
Some of the following options are only sensible for some operations; hopefully it is self-evident which ones.
.TP
.BI \-f " charmapfile" ", \-\-charmap=" charmapfile
Specify the file that defines the symbolic character names that are
used by the input file.  If the file is in the default directory for
character maps, it is not necessary to specify the full pathname.
This default directory is printed by
.BR "localedef \-\-help" .
.TP
.BI \-i " inputfile" ", \-\-inputfile=" inputfile
Specify the locale definition file to compile.  If
.I inputfile
is not absolute,
.B localedef
will also look in the directory specified by the environment variable
.B I18NPATH
and in the default directory for locale definition files.  This default
directory is printed by
.BR "localedef \-\-help" .
.TP
.BI \-u " repertoirefile" ", \-\-repertoire-map=" repertoirefile
Read mappings from sybolic names to Unicode UCS4 value from
.IR repertoirefile .
.TP
.BI \-A " aliasfile" ", \-\-alias\-file=" aliasfile
Use 
.I aliasfile
to look up aliases for locale names.
There is no default aliases file.
.TP
.BI \-\-prefix= pathname
Set prefix to be prepended to the full archive pathname.
By default, the prefix is empty.
Setting the prefix to 
.IR foo ,
the archive would be placed in
.BR foo/usr/lib/locale/locale/locale-archive .
.TP
.B "\-c, \-\-force"
Write the output files even if warnings were generated about the input
file.
.TP
.B \-\-old\-style
Create old-style tables.
.TP
.B "\-v, \-\-verbose"
Generate extra warnings about errors that are normally ignored.
.TP
.B \-\-quiet
Suppress all notifications and warnings, and report only fatal errors.
.TP
.B \-\-posix
Be strictly POSIX conformant.  Implies
.BR \-\-verbose .
This option currently has no other effect.  Posix conformance is
assumed if the environment variable
.B POSIXLY_CORRECT
is set.
.TP
.B \-\-replace
Replace a locale in the locale archive file.
Without this option, if the locale is in the archive file already,
an error occurs.
.TP
.B \-\-no\-archive
Do not use the locale archive file, instead create 
.I outputpath
as a subdirectory in the same directory as the locale archive file,
and create separate output files for locale categories in it.
.TP
.B "\-\-help"
Print a usage summary and exit.  Also prints the default paths used by
.BR localedef .
.TP
.B "\-\-usage"
Print a short usage summary and exit.
.TP
.B "\-V, \-\-version"
Print the version number, license, and disclaimer of warranty for
.BR localedef .
.SH ENVIRONMENT
.TP
.B POSIXLY_CORRECT
The
.B \-\-posix
flag is assumed if this environment variable is set.
.TP
.B I18NPATH
The default directory for locale definition files.
.SH FILES
.TP
.B /usr/share/i18n/charmaps
Usual default charmap path.
.TP
.B /usr/share/i18n/repertoiremaps
Usual default repertoire map path.
.TP
.B /usr/lib/locale/locale-archive
Usual default locale archive location.
.TP
.IB outputpath/ LC_COLLATE
One of the output files.  It describes the rules for comparing strings
in the locale's alphabet.
.TP
.IB outputpath/ LC_CTYPE
One of the output files.  It contains information about character
cases and case conversions for the locale.
.TP
.IB outputpath/ LC_MONETARY
One of the output files.  It describes the way monetary values should
be formatted in the locale.
.TP
.IB outputpath/ LC_MESSAGES/SYS_LC_MESSAGES
One of the output files.  It contains information about the language
messages should be printed in, and what an affirmative or negative
answer looks like.
.TP
.IB outputpath/ LC_NUMERIC
One of the output files.  It describes the rules for formatting
numbers in the locale.
.TP
.IB outputpath/ LC_TIME
One of the output files.  It describes the rules for formatting
times and dates in the locale.
.TP
.IB outputpath/ LC_PAPER
One of the output files. It describes the default paper size 
in the locale.
.TP
.IB outputpath/ LC_NAME
One of the output files. It describes the rules for formatting
names in the locale.
.TP
.IB outputpath/ LC_ADDRESS
One of the output files. It describes the rules for formatting
addresses, and other location information in the locale.
.TP
.IB outputpath/ LC_TELEPHONE
One of the output files. It describes the rules for formatting
telephone numbers in the locale.
.TP
.IB outputpath/ LC_MEASUREMENT
One of the output files. It describes the rules for measurement in the
locale, e.g. Metric or other units.
.TP
.IB outputpath/ LC_IDENTIFICATION
One of the output files. It identifies the elements within the locale.
.SH EXAMPLES
Compile the locale files for Finnish in the UTF-8 character set
and add it to the default locale archive with the name 
.BR fi_FI.UTF-8 :
.PP
.RS
localedef \-f UTF\-8 \-i fi_FI fi_FI.UTF\-8
.RE
.PP
The same, but generate files into the current directory (note that the
last argument must then contain a slash):
.PP
.RS
localedef \-f UTF\-8 \-i fi_FI ./.
.RE
.SH "SEE ALSO"
.BR locale "(5), " locale "(7), " locale (1)
.SH AUTHOR
The program was written by Ulrich Drepper.
.PP
This manual page was written by Richard Braakman <dark@xs4all.nl> on
behalf of the Debian GNU/Linux Project and anyone else who wants it.
It was amended by Alastair McKinstry <mckinstry@computer.org> to 
explain new ISO 14652 elements,
and amended further by Lars Wirzenius <liw@iki.fi> to document new
functionality (as of GNU C library 2.3.5).
The manpage is not supported by the GNU libc maintainers and may be
out of date.
.SH STANDARDS
This program conforms to the POSIX standard P1003.2
--- debian/local/manpages/localedef.1.old	2005-05-18 17:49:23.000000000 +0300
+++ debian/local/manpages/localedef.1	2005-05-20 01:23:38.000000000 +0300
@@ -1,25 +1,31 @@
-.TH LOCALEDEF 1 "Feb 10, 2002"
+.TH LOCALEDEF 1 "May 20, 2005"
 .SH NAME
 localedef \- compile locale definition files
 .SH SYNOPSIS
+.ad l
+.nh
 .B localedef
-.RB [ \-f
-.IR charmapfile ]
-.\" This option is ignored by the localedef program.
-.\" To avoid confusion, I decided not to list it in the synopsis.
-.\" .RB [ \-u
-.\" .IR codeset ]
-.RB [ \-i
-.IR inputfile ]
-.RB [ \-\-force ]
-.RB [ \-\-verbose ]
-.RB [ \-\-posix ]
-.RB [ \-\-quiet ]
+.RI [ options ]
 .I outputpath
 .br
+.B "localedef \-\-list\-archive"
+.RI [ options ]
+.br
+.B "localedef \-\-delete\-from\-archive"
+.RI [ options ]
+.IR localename " ..."
+.br
+.B "localedef \-\-add\-to\-archive"
+.RI [ options ]
+.IR compiledpath
+.br
 .B "localedef \-\-version"
 .br
 .B "localedef \-\-help"
+.br
+.B "localedef \-\-usage"
+.ad b
+.hy
 .SH DESCRIPTION
 The
 .B localedef
@@ -27,29 +33,80 @@
 .I charmap
 and
 .I input
-files, compiles them to a form usable by the
+files, compiles them to a binary form quickly usable by the
 .BR locale (7)
-functions in the C library, and places the six output files in the
+functions in the C library, and places the output in 
+.IR outputpath .
+.PP
+If
 .I outputpath
+contains a slash character ('/'), it is directly the name of the output
 directory.
+In this case, there is a separate output file for each locale category
+(LC_CTIME, LC_NUMERIC, and so on).
+.PP
+Otherwise, if the 
+.B \-\-no\-archive
+option is used,
+.I outputpath
+is the name of a subdirectory in
+.B /usr/lib/locale
+where per-category compiled files are placed.
+.PP
+Otherwise, 
+.I outputpath
+is the name of a locale and the compiled locale data is added to the
+archive file 
+.BR /usr/lib/locale/locale-archive .
 .PP
 If no
 .I charmapfile
-is given,
+is given, the value
 .I POSIX
 is used by default.
 If no
 .I inputfile
-is given, or if it is given as
-.BR \- ,
+is given, or if it is given as a dash
+.RB ( \- ),
 .B localedef
 reads from standard input.
 .SH OPTIONS
 Most options can have either short or long forms.  If multiple short
-options are used, they can be combined in one word (e.g.
-.BR \-cv ).
-If an option takes an argument, the argument can be given separately
-as the next word, or it can be written as option=argument.
+options are used, they can be combined in one word (for example,
+.B \-cv 
+is identical to
+.BR "\-c \-v" ).
+.PP
+If a short option takes an argument, the argument can be given separately
+as the next word
+.RB ( "\-f foo" ), 
+or it can be written together with the option letter
+.RB ( \-ffoo ).
+If a long option takes an argument, the argument can be given separately
+as the next word, or it can be written as option=argument 
+.RB ( \-\-charmap=foo ).
+.SS "Operation selection options"
+A few options direct 
+.B localedef
+to do something else than compile locale definitions.
+Only one of these should be used at a time.
+.TP
+.B \-\-delete\-from\-archive
+Delete the named locales from the locale archive file.
+.TP
+.B \-\-list\-archive
+List the locales contained in the locale archive file.
+.TP
+.B \-\-add\-to\-archive
+Add the 
+.I compiledpath
+directories to the locale archive file.
+The directories should have been created by previous runs of 
+.BR localedef ,
+using 
+.BR \-\-no\-archive .
+.SS "Other options"
+Some of the following options are only sensible for some operations; hopefully it is self-evident which ones.
 .TP
 .BI \-f " charmapfile" ", \-\-charmap=" charmapfile
 Specify the file that defines the symbolic character names that are
@@ -69,10 +126,31 @@
 directory is printed by
 .BR "localedef \-\-help" .
 .TP
+.BI \-u " repertoirefile" ", \-\-repertoire-map=" repertoirefile
+Read mappings from sybolic names to Unicode UCS4 value from
+.IR repertoirefile .
+.TP
+.BI \-A " aliasfile" ", \-\-alias\-file=" aliasfile
+Use 
+.I aliasfile
+to look up aliases for locale names.
+There is no default aliases file.
+.TP
+.BI \-\-prefix= pathname
+Set prefix to be prepended to the full archive pathname.
+By default, the prefix is empty.
+Setting the prefix to 
+.IR foo ,
+the archive would be placed in
+.BR foo/usr/lib/locale/locale/locale-archive .
+.TP
 .B "\-c, \-\-force"
 Write the output files even if warnings were generated about the input
 file.
 .TP
+.B \-\-old\-style
+Create old-style tables.
+.TP
 .B "\-v, \-\-verbose"
 Generate extra warnings about errors that are normally ignored.
 .TP
@@ -87,13 +165,24 @@
 .B POSIXLY_CORRECT
 is set.
 .TP
-.BI \-u " codeset" ", \-\-code\-set\-name=" codeset
-This option is accepted but ignored.
+.B \-\-replace
+Replace a locale in the locale archive file.
+Without this option, if the locale is in the archive file already,
+an error occurs.
+.TP
+.B \-\-no\-archive
+Do not use the locale archive file, instead create 
+.I outputpath
+as a subdirectory in the same directory as the locale archive file,
+and create separate output files for locale categories in it.
 .TP
 .B "\-\-help"
 Print a usage summary and exit.  Also prints the default paths used by
 .BR localedef .
 .TP
+.B "\-\-usage"
+Print a short usage summary and exit.
+.TP
 .B "\-V, \-\-version"
 Print the version number, license, and disclaimer of warranty for
 .BR localedef .
@@ -111,10 +200,11 @@
 .B /usr/share/i18n/charmaps
 Usual default charmap path.
 .TP
-.B /usr/share/locale
-Usual default output path.  See the output from
-.B "localedef \-\-help"
-for the paths used in your version.
+.B /usr/share/i18n/repertoiremaps
+Usual default repertoire map path.
+.TP
+.B /usr/lib/locale/locale-archive
+Usual default locale archive location.
 .TP
 .IB outputpath/ LC_COLLATE
 One of the output files.  It describes the rules for comparing strings
@@ -163,15 +253,32 @@
 .TP
 .IB outputpath/ LC_IDENTIFICATION
 One of the output files. It identifies the elements within the locale.
+.SH EXAMPLES
+Compile the locale files for Finnish in the UTF-8 character set
+and add it to the default locale archive with the name 
+.BR fi_FI.UTF-8 :
+.PP
+.RS
+localedef \-f UTF\-8 \-i fi_FI fi_FI.UTF\-8
+.RE
+.PP
+The same, but generate files into the current directory (note that the
+last argument must then contain a slash):
+.PP
+.RS
+localedef \-f UTF\-8 \-i fi_FI ./.
+.RE
 .SH "SEE ALSO"
 .BR locale "(5), " locale "(7), " locale (1)
 .SH AUTHOR
 The program was written by Ulrich Drepper.
 .PP
-This manpage was written by Richard Braakman <dark@xs4all.nl> on
+This manual page was written by Richard Braakman <dark@xs4all.nl> on
 behalf of the Debian GNU/Linux Project and anyone else who wants it.
 It was amended by Alastair McKinstry <mckinstry@computer.org> to 
-explain new ISO 14652 elements.
+explain new ISO 14652 elements,
+and amended further by Lars Wirzenius <liw@iki.fi> to document new
+functionality (as of GNU C library 2.3.5).
 The manpage is not supported by the GNU libc maintainers and may be
 out of date.
 .SH STANDARDS

Reply to: