Cygwin: man column
contains unexpected characters instead of -
(minus sign, hyphen):
# cygwin
$ man column | grep -P 'table.*truncate' | od -c
0000000 - T , - - t a b
0000020 l e 342 200 220 t r u n c a t e c o
0000040 l u m n s \n
0000046
# linux
$ man column | grep -P 'table.*truncate' | od -c
0000000 - T , - - t a b
0000020 l e - t r u n c a t e c o l u
0000040 m n s \n
0000044
Here we see that on Cygwin man column
contains unexpected characters instead of -
(minus sign, hyphen). Is it expected?
UPD. I've updated Cygwin and the issue is fixed:
$ man column | grep -P 'table.*truncate' | od -c
0000000 T
0000020 h e c o l u m n t e x t c
0000040 a n b e t r u n c a t e d
0000060 w h e n n e c e s s a r y .
0000100 T h e s a m e a s - - t a
0000120 b l e - t r u n c a t e . \n
0000140 - T , - - t a b l e
0000160 - t r u n c a t e c o l u m n
0000200 s \n
0000202
This might be caused by your $LANG
(or $LC_ALL
/ $LC_CTYPE
) being set to 'something.UTF-8'.
Does the problem go away if you run man
like this?
LC_ALL=C man column
(LC_ALL
overrides pretty much everything, so it shouldn't matter what the other environment variables are set to)
EDIT:
Minus signs (and apostrophes) should be backslash-escaped in manpages. No one actually escapes them though, which is why, on *BSD and certain Linux systems, groff
is specifically instructed not to mess with those unescaped dashes.
On Cygwin, however, as soon as groff
sees that your locale is set to UTF-8, it happily starts converting dashes to hyphens (U+2010) and apostrophes to single quotes (U+2019), which makes certain manpages, ehm, "unsearchable" and "uncopypasteable" (one particularly notorious example being man tmux
).