Hi,
having fixed the accent issues with mandoc -Tutf8, i have checked
the base system for build system issues with switching the default,
the resulting fixes are included in the following patch.
Anybody wants to check with ports before commit, such that we can do
any necessary cleanup beforehands, as opposed to mopping up
possible fallout afterwards?
Any other feedback is welcome as well, of course.
Note that unless you have set LC_CTYPE in your shell, this will
not change the game for you, or it would be a bug.
Yours,
Ingo
Index: usr.bin/mandoc/main.c
===
RCS file: /cvs/src/usr.bin/mandoc/main.c,v
retrieving revision 1.86
diff -u -p -r1.86 main.c
--- usr.bin/mandoc/main.c 6 Jan 2014 00:53:14 - 1.86
+++ usr.bin/mandoc/main.c 6 Mar 2014 20:28:01 -
@@ -98,7 +98,7 @@ main(int argc, char *argv[])
memset(curp, 0, sizeof(struct curparse));
type = MPARSE_AUTO;
- curp.outtype = OUTT_ASCII;
+ curp.outtype = OUTT_LOCALE;
curp.wlevel = MANDOCLEVEL_FATAL;
defos = NULL;
Index: usr.bin/mandoc/mandoc.1
===
RCS file: /cvs/src/usr.bin/mandoc/mandoc.1,v
retrieving revision 1.56
diff -u -p -r1.56 mandoc.1
--- usr.bin/mandoc/mandoc.1 13 Jul 2013 19:27:46 - 1.56
+++ usr.bin/mandoc/mandoc.1 6 Mar 2014 20:28:07 -
@@ -47,7 +47,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 arguments are as follows:
@@ -76,7 +76,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
@@ -173,7 +173,6 @@ arguments, which correspond to output mo
.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
@@ -186,6 +185,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
@@ -218,8 +218,8 @@ If multiple input files are specified, t
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
@@ -335,6 +335,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
Index: sbin/disklabel/Makefile
===
RCS file: /cvs/src/sbin/disklabel/Makefile,v
retrieving revision 1.54
diff -u -p -r1.54 Makefile
--- sbin/disklabel/Makefile 31 Oct 2013 22:37:17 - 1.54
+++ sbin/disklabel/Makefile 6 Mar 2014 20:28:07 -
@@ -17,7 +17,7 @@ manual.c:
echo '};'; echo 'const int manpage_sz = sizeof(manpage);') manual.c
.else
disklabel.cat8:disklabel.8
- mandoc ${.ALLSRC} ${.TARGET}
+ mandoc -Tascii ${.ALLSRC} ${.TARGET}
manual.c: disklabel.cat8
(echo 'const unsigned char manpage[] = {'; \
Index: sbin/fdisk/Makefile
===
RCS file: /cvs/src/sbin/fdisk/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- sbin/fdisk/Makefile 31 Oct 2013 22:37:17 - 1.39
+++ sbin/fdisk/Makefile 6 Mar 2014 20:28:07 -
@@ -40,7 +40,7 @@ manual.c:
echo '};'; echo 'const int manpage_sz = sizeof(manpage);') manual.c
.else
fdisk.cat8:fdisk.8
- mandoc ${.ALLSRC} ${.TARGET}
+ mandoc -Tascii ${.ALLSRC} ${.TARGET}
manual.c: fdisk.cat8
(echo 'const unsigned char manpage[] = {'; \
Index: regress/usr.bin/mandoc/roff/de/Makefile
===
RCS file: /cvs/src/regress/usr.bin/mandoc/roff/de/Makefile,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile
--- regress/usr.bin/mandoc/roff/de/Makefile 2 Jun 2012 23:18:31 -
1.1
+++ regress/usr.bin/mandoc/roff/de/Makefile 6 Mar 2014 20:28:07 -
@@ -23,10 +23,10 @@ ascii-diff-opt: TH.mandoc_ascii_opt Dd.m
${DIFF} ${.CURDIR}/Dd.out_ascii_opt Dd.mandoc_ascii_opt
TH.mandoc_ascii_opt: TH.in
- ${MANDOC} -man ${.ALLSRC} ${.TARGET}
+ ${MANDOC} -Tascii -man ${.ALLSRC} ${.TARGET}
Dd.mandoc_ascii_opt: Dd.in
- ${MANDOC} -mdoc ${.ALLSRC} ${.TARGET}
+ ${MANDOC} -Tascii -mdoc ${.ALLSRC} ${.TARGET}
ascii-clean-opt:
rm -f TH.mandoc_ascii_opt Dd.mandoc_ascii_opt