aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-02 11:31:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-02 11:31:51 +0000
commit310deef5c2cc84a2ecda907d7fe5a559957b537c (patch)
tree887f0d43adce1caabfeae873ed3c0b8100a48ae1
parenta86ac0ebc7ac7bb8f109952e78973f4cc241904a (diff)
downloadmandoc-310deef5c2cc84a2ecda907d7fe5a559957b537c.tar.gz
mandoc-310deef5c2cc84a2ecda907d7fe5a559957b537c.tar.zst
mandoc-310deef5c2cc84a2ecda907d7fe5a559957b537c.zip
Switch the default output mode from -Tascii to -Tlocale.
This doesn't change anything unless LC_CTYPE is set, but it helps when running with LC_TYPE=something.UTF-8. OK tedu@ and earlier positive feedback from: bentley@ deraadt@ naddy@ stsp@ uqs@freebsd wiz@netbsd
-rw-r--r--main.c4
-rw-r--r--mandoc.116
2 files changed, 11 insertions, 9 deletions
diff --git a/main.c b/main.c
index 34784994..b97d664b 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.200 2014/11/26 21:40:17 schwarze Exp $ */
+/* $Id: main.c,v 1.201 2014/12/02 11:31:51 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -148,7 +148,7 @@ main(int argc, char *argv[])
/* Parser and formatter options. */
memset(&curp, 0, sizeof(struct curparse));
- curp.outtype = OUTT_ASCII;
+ curp.outtype = OUTT_LOCALE;
curp.wlevel = MANDOCLEVEL_FATAL;
options = MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1;
defos = NULL;
diff --git a/mandoc.1 b/mandoc.1
index 5387ec83..45a6b0cf 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.127 2014/11/30 05:29:00 schwarze Exp $
+.\" $Id: mandoc.1,v 1.128 2014/12/02 11:31:51 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 30 2014 $
+.Dd $Mdocdate: December 2 2014 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -49,7 +49,7 @@ or
text from stdin, implying
.Fl m Ns Cm andoc ,
and produces
-.Fl T Ns Cm ascii
+.Fl T Ns Cm locale
output.
.Pp
The options are as follows:
@@ -146,7 +146,7 @@ See
.Sx Output Formats
for available formats.
Defaults to
-.Fl T Ns Cm ascii .
+.Fl T Ns Cm locale .
.It Fl V
Print version and exit.
.It Fl W Ns Ar level
@@ -255,7 +255,6 @@ arguments, which correspond to output modes:
.Bl -tag -width "-Tlocale"
.It Fl T Ns Cm ascii
Produce 7-bit ASCII output.
-This is the default.
See
.Sx ASCII Output .
.It Fl T Ns Cm html
@@ -268,6 +267,7 @@ Implies
.Fl W Ns Cm warning .
.It Fl T Ns Cm locale
Encode output using the current locale.
+This is the default.
See
.Sx Locale Output .
.It Fl T Ns Cm man
@@ -299,8 +299,8 @@ If multiple input files are specified, these will be processed by the
corresponding filter in-order.
.Ss ASCII Output
Output produced by
-.Fl T Ns Cm ascii ,
-which is the default, is rendered in standard 7-bit ASCII documented in
+.Fl T Ns Cm ascii
+is rendered in standard 7-bit ASCII documented in
.Xr ascii 7 .
.Pp
Font styles are applied by using back-spaced encoding such that an
@@ -413,6 +413,8 @@ relative URI.
.Ss Locale Output
Locale-depending output encoding is triggered with
.Fl T Ns Cm locale .
+This is the default.
+.Pp
This option is not available on all systems: systems without locale
support, or those whose internal representation is not natively UCS-4,
will fall back to