diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-04 17:17:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-04 17:17:34 +0000 |
commit | f13f5fb6cfbf03df6d30eb3322d11bbb9e955fb2 (patch) | |
tree | 539949a76e6e1082dac9b1c6cb7f980c0ee63d69 | |
parent | d9daa5be69a29302f85e87b1e1bd45f38f568427 (diff) | |
download | mandoc-f13f5fb6cfbf03df6d30eb3322d11bbb9e955fb2.tar.gz |
Make the description of -K autodetection easer to understand.
Basic idea suggested by jmc@, OK jmc@.
-rw-r--r-- | mandoc.1 | 30 |
1 files changed, 19 insertions, 11 deletions
@@ -98,21 +98,29 @@ arguments are .Cm iso-8859-1 , and .Cm utf-8 . -If not specified, autodetection uses the first match: -.Bl -tag -width iso-8859-1 -.It Cm utf-8 -if the first three bytes of the input file -are the UTF-8 byte order mark (BOM, 0xefbbbf) -.It Ar encoding -if the first or second line of the input file matches the +If not specified, autodetection uses the first match in the following +list: +.Bl -enum +.It +If the first three bytes of the input file are the UTF-8 byte order +mark (BOM, 0xefbbbf), input is interpreted as +.Cm utf-8 . +.It +If the first or second line of the input file matches the .Sy emacs mode line format .Pp .D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*- -.It Cm utf-8 -if the first non-ASCII byte in the file introduces a valid UTF-8 sequence -.It Cm iso-8859-1 -otherwise +.Pp +then input is interpreted according to +.Ar encoding . +.It +If the first non-ASCII byte in the file introduces a valid UTF-8 +sequence, input is interpreted as +.Cm utf-8 . +.It +Otherwise, input is interpreted as +.Cm iso-8859-1 . .El .It Fl k A synonym for |