tags 325699 patch tags 426362 patch user ubuntu-de...@lists.ubuntu.com usertags 325699 ubuntu-patch karmic usertags 426362 ubuntu-patch karmic thanks
On Tue, Aug 30, 2005 at 02:33:43PM +0500, Stepan Golosunov wrote: > Package: w3m > Version: 0.5.1-3 > Severity: normal > > w3mman does not display underlined characters in Russian man pages in > utf-8 terminals; man shows them correctly. > > Output of > LANG=ru_RU.UTF-8 lxterm -e w3mman dpkg > and > LANG=ru_RU.UTF-8 lxterm -e man dpkg > attached. w3mman should set MAN_KEEP_FORMATTING=1 in the environment to instruct man not to invoke col to strip away formatting characters, which it normally does by default when writing to a pipe. I added this feature to man-db with the express intention that it should be used by programs like pinfo and w3mman that invoke man and can do something with its formatted output. Patch attached. Doing this looks as though it should fix #426362 too. Thanks, -- Colin Watson [cjwat...@ubuntu.com]
* debian/patches/10-w3mman-keep-formatting: Set MAN_KEEP_FORMATTING=1 to instruct man to preserve formatting characters in its output rather than filtering them through col (closes: #325699, #426362; LP: #283975, #353900). diff -u w3m-0.5.2/debian/patches/series w3m-0.5.2/debian/patches/series --- w3m-0.5.2/debian/patches/series +++ w3m-0.5.2/debian/patches/series @@ -3,0 +4 @@ +10-w3mman-keep-formatting only in patch2: unchanged: --- w3m-0.5.2.orig/debian/patches/10-w3mman-keep-formatting +++ w3m-0.5.2/debian/patches/10-w3mman-keep-formatting @@ -0,0 +1,28 @@ +Description: Instruct man to preserve formatting characters in its output + rather than filtering them through col. Works as of man-db 2.5.0, but is + harmless with older versions. +Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325699 +Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/353900 + +Index: b/scripts/w3mman/w3mman2html.cgi.in +=================================================================== +--- a/scripts/w3mman/w3mman2html.cgi.in ++++ b/scripts/w3mman/w3mman2html.cgi.in +@@ -76,7 +76,7 @@ + if (! ($file =~ /^\//)) { + $file = $query{"pwd"} . '/' . $file; + } +- open(F, "$MAN -l $file 2> /dev/null |"); ++ open(F, "MAN_KEEP_FORMATTING=1 $MAN -l $file 2> /dev/null |"); + } else { + $man = $query{"man"}; + if ($man =~ s/\((\w+)\)$//) { +@@ -92,7 +92,7 @@ + + $section =~ s:([^-\w\200-\377.,])::g; + $man =~ s:([^-\w\200-\377.,])::g; +- open(F, "$MAN $section $man 2> /dev/null |"); ++ open(F, "MAN_KEEP_FORMATTING=1 $MAN $section $man 2> /dev/null |"); + } + $ok = 0; + undef $header;