2014-03-09 09:14:03 +00:00
|
|
|
.\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
iconv.1, locale.1, memusage.1, memusagestat.1, pldd.1, sprof.1, _syscall.2, add_key.2, adjtimex.2, bind.2, bpf.2, chown.2, clone.2, close.2, copy_file_range.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fork.2, fsync.2, futex.2, getdents.2, getrlimit.2, getxattr.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, ioctl_fat.2, ioctl_getfsmap.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2, kcmp.2, keyctl.2, listen.2, listxattr.2, mbind.2, membarrier.2, memfd_create.2, mkdir.2, move_pages.2, mremap.2, msync.2, nfsservctl.2, open.2, perf_event_open.2, pidfd_send_signal.2, pipe.2, pivot_root.2, pkey_alloc.2, process_vm_readv.2, ptrace.2, readlink.2, readv.2, recv.2, recvmmsg.2, rename.2, request_key.2, s390_runtime_instr.2, sched_setaffinity.2, seccomp.2, send.2, sendmmsg.2, sigaltstack.2, signalfd.2, socket.2, socketpair.2, splice.2, spu_create.2, spu_run.2, statfs.2, syscall.2, sysctl.2, sysfs.2, tee.2, timer_getoverrun.2, timer_settime.2, umount.2, userfaultfd.2, utimensat.2, wait4.2, INFINITY.3, __ppc_get_timebase.3, __setfpucw.3, abort.3, aio_cancel.3, aio_error.3, aio_read.3, aio_return.3, atexit.3, backtrace.3, basename.3, bsearch.3, bswap.3, cacos.3, cacosh.3, catan.3, catanh.3, cexp2.3, clock_getcpuclockid.3, clog2.3, cmsg.3, confstr.3, div.3, dl_iterate_phdr.3, dlerror.3, dlinfo.3, dlopen.3, dlsym.3, duplocale.3, encrypt.3, end.3, endian.3, envz_add.3, err.3, expm1.3, fdim.3, flockfile.3, fmtmsg.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo_a.3, getauxval.3, getdate.3, getdtablesize.3, getgrent_r.3, getgrouplist.3, gethostbyname.3, getline.3, getnameinfo.3, getopt.3, getprotoent_r.3, getpwent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, getutent.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, inet.3, inet_net_pton.3, inet_ntop.3, inet_pton.3, insque.3, killpg.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbsnrtowcs.3, mbstowcs.3, mcheck.3, mempcpy.3, mq_getattr.3, mq_notify.3, mtrace.3, newlocale.3, nextafter.3, ntp_gettime.3, offsetof.3, open_memstream.3, pow.3, printf.3, pthread_attr_init.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setstack.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_detach.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_mutex_consistent.3, pthread_mutexattr_setrobust.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, pthread_spin_init.3, pthread_testcancel.3, pthread_tryjoin_np.3, ptsname.3, qsort.3, rand.3, random.3, remainder.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, sem_getvalue.3, sem_wait.3, setaliasent.3, setlogmask.3, sigwait.3, sincos.3, sockatmark.3, stdarg.3, stpcpy.3, strcat.3, strfmon.3, strptime.3, strtod.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, tsearch.3, uselocale.3, wcstok.3, wcstombs.3, wordexp.3, y0.3, loop.4, vcs.4, veth.4, charmap.5, core.5, filesystems.5, gai.conf.5, hosts.5, hosts.equiv.5, locale.5, nss.5, repertoiremap.5, securetty.5, shells.5, ttytype.5, ascii.7, complex.7, cpuset.7, credentials.7, fanotify.7, hier.7, inotify.7, ip.7, mount_namespaces.7, mq_overview.7, netlink.7, network_namespaces.7, pid_namespaces.7, pkeys.7, rtld-audit.7, rtnetlink.7, sem_overview.7, signal-safety.7, sock_diag.7, spufs.7, standards.7, symlink.7, tcp.7, time_namespaces.7, unix.7, user_namespaces.7, xattr.7, ldconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 12:43:54 +00:00
|
|
|
.TH LOCALE 1 2020-06-09 "Linux" "Linux User Manual"
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH NAME
|
|
|
|
locale \- get locale-specific information
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
2014-08-30 13:48:26 +00:00
|
|
|
.BR locale " [\fIoption\fP]"
|
2016-07-07 11:10:05 +00:00
|
|
|
.BR locale " [\fIoption\fP] " \-a
|
|
|
|
.BR locale " [\fIoption\fP] " \-m
|
2014-08-30 13:48:26 +00:00
|
|
|
.BR locale " [\fIoption\fP] \fIname\fP..."
|
2014-03-09 09:14:03 +00:00
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.B locale
|
|
|
|
command displays information about the current locale, or all locales,
|
|
|
|
on standard output.
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.PP
|
2014-03-09 09:14:03 +00:00
|
|
|
When invoked without arguments,
|
|
|
|
.B locale
|
|
|
|
displays the current locale settings for each locale category (see
|
|
|
|
.BR locale (5)),
|
|
|
|
based on the settings of the environment variables that control the locale
|
|
|
|
(see
|
|
|
|
.BR locale (7)).
|
2015-07-23 14:15:22 +00:00
|
|
|
Values for variables set in the environment are printed without double
|
2015-06-12 13:31:53 +00:00
|
|
|
quotes, implied values are printed with double quotes.
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.PP
|
2014-03-09 09:14:03 +00:00
|
|
|
If either the
|
|
|
|
.B \-a
|
|
|
|
or the
|
|
|
|
.B \-m
|
|
|
|
option (or one of their long-format equivalents) is specified,
|
|
|
|
the behavior is as follows:
|
|
|
|
.TP
|
|
|
|
.BR \-a ", " \-\-all\-locales
|
|
|
|
Display a list of all available locales.
|
|
|
|
The
|
2020-07-01 22:05:53 +00:00
|
|
|
.B \-v
|
2014-03-09 09:14:03 +00:00
|
|
|
option causes the
|
|
|
|
.B LC_IDENTIFICATION
|
|
|
|
metadata about each locale to be included in the output.
|
|
|
|
.TP
|
|
|
|
.BR \-m ", " \-\-charmaps
|
|
|
|
Display the available charmaps (character set description files).
|
2016-01-18 11:07:33 +00:00
|
|
|
To display the current character set for the locale, use
|
2020-07-01 22:05:53 +00:00
|
|
|
\fBlocale \-c charmap\fR.
|
2014-03-09 09:14:03 +00:00
|
|
|
.PP
|
|
|
|
The
|
2015-01-26 16:21:17 +00:00
|
|
|
.B locale
|
2014-03-09 09:14:03 +00:00
|
|
|
command can also be provided with one or more arguments,
|
|
|
|
which are the names of locale keywords (for example,
|
|
|
|
.IR date_fmt ,
|
|
|
|
.IR ctype-class-names ,
|
|
|
|
.IR yesexpr ,
|
|
|
|
or
|
|
|
|
.IR decimal_point )
|
|
|
|
or locale categories (for example,
|
getent.1, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1: tfix, use a one-font macro for a single argument
1) Use a single capital font macro for a genuine single argument.
The output is unchanged.
2) Remove quotation marks (") around a single argument.
The output is unchanged.
3) Change ".IR ab()" to ".IR ab ()"
A font is changed in the output.
mtk: I verified that the output is unchanged (other than fonts)
by comparing the output of:
for a in *.1; do man $a >> out.txt; done
before and after the patch.
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-12-24 00:20:29 +00:00
|
|
|
.B LC_CTYPE
|
2014-03-09 09:14:03 +00:00
|
|
|
or
|
|
|
|
.BR LC_TIME ).
|
|
|
|
For each argument, the following is displayed:
|
|
|
|
.IP * 3
|
|
|
|
For a locale keyword, the value of that keyword to be displayed.
|
|
|
|
.IP *
|
|
|
|
For a locale category,
|
|
|
|
the values of all keywords in that category are displayed.
|
|
|
|
.PP
|
|
|
|
When arguments are supplied, the following options are meaningful:
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-c ", " \-\-category\-name
|
2014-03-09 09:14:03 +00:00
|
|
|
For a category name argument,
|
|
|
|
write the name of the locale category
|
|
|
|
on a separate line preceding the list of keyword values for that category.
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.IP
|
2014-03-09 09:14:03 +00:00
|
|
|
For a keyword name argument,
|
|
|
|
write the name of the locale category for this keyword
|
|
|
|
on a separate line preceding the keyword value.
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.IP
|
2014-03-09 09:14:03 +00:00
|
|
|
This option improves readability when multiple name arguments are specified.
|
|
|
|
It can be combined with the
|
|
|
|
.B \-k
|
|
|
|
option.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-k ", " \-\-keyword\-name
|
2014-03-09 09:14:03 +00:00
|
|
|
For each keyword whose value is being displayed,
|
|
|
|
include also the name of that keyword,
|
|
|
|
so that the output has the format:
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.IP
|
2014-03-09 09:14:03 +00:00
|
|
|
\fIkeyword\fP="\fIvalue\fP"
|
|
|
|
.PP
|
|
|
|
The
|
2015-01-26 16:21:17 +00:00
|
|
|
.B locale
|
2014-03-09 09:14:03 +00:00
|
|
|
command also knows about the following options:
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-v ", " \-\-verbose
|
2014-03-09 09:14:03 +00:00
|
|
|
Display additional information for some command-line option and argument
|
|
|
|
combinations.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-? ", " \-\-help
|
2014-03-09 09:14:03 +00:00
|
|
|
Display a summary of command-line options and arguments and exit.
|
|
|
|
.TP
|
getent.1, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1: tfix, use a one-font macro for a single argument
1) Use a single capital font macro for a genuine single argument.
The output is unchanged.
2) Remove quotation marks (") around a single argument.
The output is unchanged.
3) Change ".IR ab()" to ".IR ab ()"
A font is changed in the output.
mtk: I verified that the output is unchanged (other than fonts)
by comparing the output of:
for a in *.1; do man $a >> out.txt; done
before and after the patch.
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-12-24 00:20:29 +00:00
|
|
|
.B \-\-usage
|
2014-03-09 09:14:03 +00:00
|
|
|
Display a short usage message and exit.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-V ", " \-\-version
|
2014-03-09 09:14:03 +00:00
|
|
|
Display the program version and exit.
|
2014-06-02 13:38:20 +00:00
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
.I /usr/lib/locale/locale-archive
|
|
|
|
Usual default locale archive location.
|
|
|
|
.TP
|
|
|
|
.I /usr/share/i18n/locales
|
|
|
|
Usual default path for locale definition files.
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH CONFORMING TO
|
2014-06-02 13:38:20 +00:00
|
|
|
POSIX.1-2001, POSIX.1-2008.
|
2020-05-21 08:00:37 +00:00
|
|
|
.SH EXAMPLES
|
locale.1, pldd.1, bpf.2, clone.2, copy_file_range.2, dup.2, execve.2, futex.2, get_kernel_syms.2, getdents.2, getrlimit.2, getunwind.2, init_module.2, ioctl_console.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-18 11:01:10 +00:00
|
|
|
.EX
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale\fP
|
|
|
|
LANG=en_US.UTF\-8
|
|
|
|
LC_CTYPE="en_US.UTF\-8"
|
|
|
|
LC_NUMERIC="en_US.UTF\-8"
|
|
|
|
LC_TIME="en_US.UTF\-8"
|
|
|
|
LC_COLLATE="en_US.UTF\-8"
|
|
|
|
LC_MONETARY="en_US.UTF\-8"
|
|
|
|
LC_MESSAGES="en_US.UTF\-8"
|
|
|
|
LC_PAPER="en_US.UTF\-8"
|
|
|
|
LC_NAME="en_US.UTF\-8"
|
|
|
|
LC_ADDRESS="en_US.UTF\-8"
|
|
|
|
LC_TELEPHONE="en_US.UTF\-8"
|
|
|
|
LC_MEASUREMENT="en_US.UTF\-8"
|
|
|
|
LC_IDENTIFICATION="en_US.UTF\-8"
|
2014-03-11 11:33:43 +00:00
|
|
|
LC_ALL=
|
|
|
|
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale date_fmt\fP
|
|
|
|
%a %b %e %H:%M:%S %Z %Y
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale \-k date_fmt\fP
|
|
|
|
date_fmt="%a %b %e %H:%M:%S %Z %Y"
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale \-ck date_fmt\fP
|
|
|
|
LC_TIME
|
|
|
|
date_fmt="%a %b %e %H:%M:%S %Z %Y"
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-05-26 14:24:32 +00:00
|
|
|
$ \fBlocale LC_TELEPHONE\fP
|
|
|
|
+%c (%a) %l
|
|
|
|
(%a) %l
|
|
|
|
11
|
|
|
|
1
|
2014-03-09 09:14:03 +00:00
|
|
|
UTF\-8
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-05-26 14:24:32 +00:00
|
|
|
$ \fBlocale \-k LC_TELEPHONE\fP
|
|
|
|
tel_int_fmt="+%c (%a) %l"
|
|
|
|
tel_dom_fmt="(%a) %l"
|
|
|
|
int_select="11"
|
|
|
|
int_prefix="1"
|
|
|
|
telephone\-codeset="UTF\-8"
|
locale.1, pldd.1, bpf.2, clone.2, copy_file_range.2, dup.2, execve.2, futex.2, get_kernel_syms.2, getdents.2, getrlimit.2, getunwind.2, init_module.2, ioctl_console.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-18 11:01:10 +00:00
|
|
|
.EE
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.PP
|
2014-05-26 08:28:34 +00:00
|
|
|
The following example compiles a custom locale from the
|
|
|
|
.I ./wrk
|
|
|
|
directory with the
|
|
|
|
.BR localedef (1)
|
|
|
|
utility under the
|
|
|
|
.I $HOME/.locale
|
|
|
|
directory, then tests the result with the
|
|
|
|
.BR date (1)
|
|
|
|
command, and then sets the environment variables
|
|
|
|
.B LOCPATH
|
|
|
|
and
|
|
|
|
.B LANG
|
|
|
|
in the shell profile file so that the custom locale will be used in the
|
|
|
|
subsequent user sessions:
|
iconv.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 00:52:54 +00:00
|
|
|
.PP
|
intro.1, locale.1, ioctl_list.2, listxattr.2, memfd_create.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, poll.2, process_vm_readv.2, ptrace.2, select.2, select_tut.2, semop.2, sendmmsg.2, shmget.2, sigaction.2, spu_run.2, umask.2, wait4.2, nan.3, setlocale.3, feature_test_macros.7, glob.7, posixoptions.7, rtld-audit.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-19 10:56:40 +00:00
|
|
|
.EX
|
2020-07-01 22:05:53 +00:00
|
|
|
$ \fBmkdir \-p $HOME/.locale\fP
|
|
|
|
$ \fBI18NPATH=./wrk/ localedef \-f UTF-8 \-i fi_SE $HOME/.locale/fi_SE.UTF-8\fP
|
2014-05-26 08:28:34 +00:00
|
|
|
$ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF-8 date\fP
|
locale.1, memusage.1, pldd.1, _syscall.2, add_key.2, bind.2, bpf.2, chown.2, clone.2, copy_file_range.2, eventfd.2, execve.2, futex.2, getdents.2, getrlimit.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, membarrier.2, memfd_create.2, mmap.2, mprotect.2, msgop.2, open_by_handle_at.2, perf_event_open.2, pipe.2, readdir.2, readlink.2, readv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, select_tut.2, sendmmsg.2, setns.2, signalfd.2, spu_run.2, stat.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, wait.2, CPU_SET.3, __ppc_get_timebase.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, confstr.3, ctime.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, end.3, endian.3, fgetws.3, fmemopen.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, iswblank.3, iswspace.3, makecontext.3, mallinfo.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, qsort.3, rand.3, readdir.3, regex.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strftime.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, termios.3, tsearch.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, console_codes.4, dsp56k.4, full.4, initrd.4, loop.4, vcs.4, charmap.5, core.5, elf.5, locale.5, proc.5, repertoiremap.5, sysfs.5, termcap.5, aio.7, bpf-helpers.7, cgroups.7, charsets.7, complex.7, fanotify.7, feature_test_macros.7, inotify.7, locale.7, man-pages.7, man.7, pkeys.7, pthreads.7, rtld-audit.7, sock_diag.7, unix.7, user_namespaces.7, utf-8.7: Use '\e' rather than '\\' to get a backslash
Quoting Branden:
*roff escape sequences may sometimes look like C escapes, but that
is misleading. *roff is in part a macro language and that means
recursive expansion to arbitrary depths.
You can get away with "\\" in a context where no macro expansion
is taking place, but try to spell a literal backslash this way in
the argument to a macro and you will likely be unhappy with
results.
Try viewing the attached file with "man -l".
"\e" is the preferred and portable way to get a portable "escape
literal" going back to CSTR #54, the original Bell Labs troff
paper.
groff(7) discusses the issue:
\\ reduces to a single backslash; useful to delay its
interpretation as escape character in copy mode. For a
printable backslash, use \e, or even better \[rs], to be
independent from the current escape character.
As of groff 1.22.4, groff_man(7) does as well:
\e Widely used in man pages to represent a backslash output
glyph. It works reliably as long as the .ec request is
not used, which should never happen in man pages, and it
is slightly more portable than the more exact ‘\(rs’
(“reverse solidus”) escape sequence.
People not concerned with portability to extremely old troffs should
probably just use \(rs (or \[rs]), as it means "the backslash
glyph", not "the glyph corresponding to whatever the current escape
character is".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 11:57:17 +00:00
|
|
|
$ \fBecho "export LOCPATH=\e$HOME/.locale" >> $HOME/.bashrc\fP
|
2014-05-26 08:28:34 +00:00
|
|
|
$ \fBecho "export LANG=fi_SE.UTF-8" >> $HOME/.bashrc\fP
|
intro.1, locale.1, ioctl_list.2, listxattr.2, memfd_create.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, poll.2, process_vm_readv.2, ptrace.2, select.2, select_tut.2, semop.2, sendmmsg.2, shmget.2, sigaction.2, spu_run.2, umask.2, wait4.2, nan.3, setlocale.3, feature_test_macros.7, glob.7, posixoptions.7, rtld-audit.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-19 10:56:40 +00:00
|
|
|
.EE
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH SEE ALSO
|
2014-05-26 08:28:34 +00:00
|
|
|
.BR localedef (1),
|
2014-06-02 13:38:20 +00:00
|
|
|
.BR charmap (5),
|
2014-03-09 09:14:03 +00:00
|
|
|
.BR locale (5),
|
|
|
|
.BR locale (7)
|