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

Re: UTF-8 locale, strange chars in X terminal pager(s), specifically man pages



fbhjr@fhase.net (Frederick B. Henry Jr.) writes:

> Context: Debian unstable. [...] Since switching my locale to
> en_US.UTF-8 (dpkg-reconfigure locales),

I think "dpkg-reconfigure locales" takes of that, but just to be sure,
could you verify that /etc/locale.gen contains a line

  en_US.UTF-8 UTF-8

If you re-run "locale-gen" as root, does that emit any error messages?

> 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.."  
>
> That intercalating pattern -- â@~^PP -- is throughout the man page.

To find out if it's a problem of "man" or the pager, use "cat" as pager.
In particular, what does

  PAGER=cat man cat | hexdump -C | grep ^000006

print? It prints

00000600  6f 72 6e 20 47 72 61 6e  6c 75 6e 64 20 61 6e 64  |orn Granlund and|
00000610  20 52 69 63 68 61 72 64  20 4d 2e 20 53 74 61 6c  | Richard M. Stal|
00000620  6c 6d 61 6e 2e 0a 0a 52  08 52 45 08 45 50 08 50  |lman...R.RE.EP.P|
00000630  4f 08 4f 52 08 52 54 08  54 49 08 49 4e 08 4e 47  |O.OR.RT.TI.IN.NG|
00000640  08 47 20 42 08 42 55 08  55 47 08 47 53 08 53 0a  |.G B.BU.UG.GS.S.|
00000650  20 20 20 20 20 20 20 52  65 70 6f 72 74 20 62 75  |       Report bu|
00000660  67 73 20 74 6f 20 3c 62  75 67 e2 80 90 63 6f 72  |gs to <bug...cor|
00000670  65 75 74 69 6c 73 40 67  6e 75 2e 6f 72 67 3e 2e  |eutils@gnu.org>.|
00000680  0a 0a 43 08 43 4f 08 4f  50 08 50 59 08 59 52 08  |..C.CO.OP.PY.YR.|
00000690  52 49 08 49 47 08 47 48  08 48 54 08 54 0a 20 20  |RI.IG.GH.HT.T.  |
000006a0  20 20 20 20 20 43 6f 70  79 72 69 67 68 74 20 c2  |     Copyright .|
000006b0  a9 20 32 30 30 34 20 46  72 65 65 20 53 6f 66 74  |. 2004 Free Soft|
000006c0  77 61 72 65 20 46 6f 75  6e 64 61 74 69 6f 6e 2c  |ware Foundation,|
000006d0  20 49 6e 63 2e 0a 20 20  20 20 20 20 20 54 68 69  | Inc..       Thi|
000006e0  73 20 69 73 20 66 72 65  65 20 73 6f 66 74 77 61  |s is free softwa|
000006f0  72 65 3b 20 73 65 65 20  74 68 65 20 73 6f 75 72  |re; see the sour|

here. The interesting parts are the hyphen in "bug-coreutils"
(bytes e2 80 90) and the copyright character in "Copyright (C) 2004"
(bytes c2 a9).

Martin


-- 
   ,--.                                          ,= ,-_-. =.
  / ,- )    Martin Dickopp, Dresden, Germany    ((_/)o o(\_))
  \ `-'        http://www.zero-based.org/        `-'(. .)`-'
   `-.                                               \_/



Reply to: