Re: UTF-8 locale, strange chars in X terminal pager(s), specifically man pages
On 2004-09-30 00:03:49 -0500, Frederick B. Henry Jr. wrote:
> Since switching my locale to en_US.UTF-8 (dpkg-reconfigure locales),
> whenever I use any pager (more, less, most) to read a man page I get
> strange chars, e.g.:
>
> man procmailrc (PAGER=/usr/bin/most) yields:
>
> "delivering and nonâ@~^Pdelivering recipes.."
In an UTF-8 sequence, you shouldn't have a ^P; this is strange.
Now, Debian doesn't use the non-ASCII hyphen to make searching in
man pages easier (see /etc/groff/man.local). So, this seems to be
a bug in the procmailrc page (or perhaps the non-ASCII hyphen is
normal in this special context).
On my machine, I don't see any problem, perhaps because I have
uncommented the last two lines of
. \" Many UTF-8 man pages use "-" instead of "\-" for dashes such as those
. \" in command-line options. This is a bug in those pages, but if you want
. \" all hyphens to be rendered as the ASCII-compatible HYPHEN-MINUS
. \" anyway, then uncomment this.
. \" if '\*[.T]'utf8' \
. \" char - \N'45'
(more precisely, I copied both files from /etc/groff to $HOME/etc/groff,
uncommented these lines and set GROFF_TMAC_PATH to "$HOME/etc/groff").
BTW, I've tried after unsetting GROFF_TMAC_PATH, and this non-ASCII
hyphen (shorter than the ASCII one) displays without any problem (in
a UXTerm, i.e. XTerm with UTF-8 locales and UTF-8 fonts).
> Is there some specific font I should be using? How do I get a clean
> man page in an xterm/aterm/rxvt/mlterm with a UTF-8 locale?
If you use UXTerm, the fonts are already set up:
/etc/X11/app-defaults/XTerm contains
*VT100.utf8Fonts.font2: -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1
*VT100.utf8Fonts.font: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
*VT100.utf8Fonts.font3: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
*VT100.utf8Fonts.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
*VT100.utf8Fonts.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
*VT100.utf8Fonts.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Reply to: