[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] UTF-8 out-of-the box experience

From: Werner LEMBERG
Subject: Re: [Groff] UTF-8 out-of-the box experience
Date: Thu, 03 May 2001 15:15:14 +0200 (CEST)

> It is very disappointing that this doesn't work correctly
> out-of-the-box, because the underlying groff mechanics for UTF-8
> output is already in place and seems to work correctly:
>   zcat /usr/share/man/man7/groff_char.7.gz | groff -mandoc -Tutf8 - | less
> produces the desired results, whereas
>   man groff_char
> does not.
> The required fix here is that groff should get a new output device
> -Tplaintext which specifies plaintext encoded according to the
> current locale (just query nl_langinfo(CODESET) and see whether it
> says "UTF-8" or "ISO-8859-*" or something like that).

As already discussed and described in previous mails, we will
implement a pre- and postprocessor to handle this.

> Then in /etc/man.config, we
> could simply replace
>   NROFF           /usr/bin/groff -Tlatin1 -mandoc
> with
>   NROFF           /usr/bin/groff -Tplaintext -mandoc
> and man would automatically work properly in both ISO-8859 and UTF-8
> locales.

What about this:

  NROFF          /usr/bin/nroff -mandoc

(no -T option).  This will use a default TTY device: First, it tries
`locale charmap', then it checks `${LC_ALL-${LC_CTYPE-${LANG}}}', and
finally it tests $LESSCHARSET.

A bit undocumented, sorry.

> "less" (less 358+iso247) is also still broken and completely messes up
> in UTF-8 mode the handling of backspace boldification used by nroff.

I'll eventually implement ISO 6429...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]