Comment 1 by Richard Levitte, Mar 22, 2011
The conclusion is incorrect. What happens is that nroff/groff does
not recognise UTF-8 input. For groff, the default is iso-8859-1,
and all it will do, then, is to interpret the UTF-8 characters as a
series of iso-8859-1 characters, and will happily convert them to
UTF-8 (because the locale says it should), hence the weird display.
With groff, it's possible to have it filter the input with another
program, preconv. It does so if you call it with -k or -K, or if
the environment variable GROFF_ENCODING is set to our input
encoding.
The absolutely easiest way to deal with this is to change the
current nroff call in std_hooks.lua to the following:
GROFF_ENCODING=`locale charmap` nroff -man -rLL=%d | less -R
I can't quite grasp why 'LANG=de_DE.ISO-8859-1 mtn manpage' wouldn't
work for you, Thomas. The following works perfectly for me, and
makes sense:
LANG=sv_SE.ISO-8859-1 mtn manpage
Anyhow, there's a choice. Either we can modify std_hooks.lua, which
is really the simplest, or we can modify scr/cmd.cc, which isn't
hard, really, it just requires a few more lines of code (more to
type ;-)).
Status:
Accepted
Owner: levitte
Owner: levitte
Comment 2 by Richard Levitte, Mar 22, 2011
Revision 40ca0bb7367dc73f024da6ded659be69cfac1144 contains a solution for groff users. That doesn't solve the issue for those who do not use groff, but it won't harm them either.
Sign in to reply to this comment.
Reported by Thomas Keller, Mar 22, 2011