Ticket #1539: Dealing with utf-8 man pages in view/open

Weird characters are displayed when viewing/opening man page files.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Egmont Koblinger 2014-09-02 14:31:15 +03:00 committed by Slava Zanko
parent 5ce01a4a58
commit d77999a6db
1 changed files with 4 additions and 2 deletions

View File

@ -45,7 +45,7 @@ do_view_action() {
cat "${MC_EXT_FILENAME}"
;;
*)
{ zsoelim "${MC_EXT_FILENAME}" 2>/dev/null || cat "${MC_EXT_FILENAME}"; } | nroff @MAN_FLAGS@ @MANDOC@
MANROFFOPT=-c MAN_KEEP_FORMATTING=1 man -P cat -l "${MC_EXT_FILENAME}"
;;
esac
;;
@ -64,7 +64,9 @@ do_view_action() {
${unpacker} "${MC_EXT_FILENAME}"
;;
*)
${unpacker} "${MC_EXT_FILENAME}" | nroff @MAN_FLAGS@ @MANDOC@
# "man" takes care of uncompressing.
# This way the stdin is left intact so the correct width is used.
MANROFFOPT=-c MAN_KEEP_FORMATTING=1 man -P cat -l "${MC_EXT_FILENAME}"
;;
esac
;;