The initial bug report is here : http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1446 but b/c the behaviour could be Gentoo specific I cross post the bug into Gentoo's bugzilla too. In short lynx doesn't dump the output into a flat text file. Reproducible: Always
Can you post emerge --info and which version of lynx are you using?
I'm using www-client/lynx-2.8.6-r2 at a stable Gentoo: tfoerste@n22 ~ $ emerge --info Portage 2.1.2.2 (default-linux/x86/2006.1, gcc-3.4.6, glibc-2.5-r0, 2.6.19-gentoo-r5 i686) ================================================================= System uname: 2.6.19-gentoo-r5 i686 Intel(R) Pentium(R) M processor 1700MHz Gentoo Base System release 1.12.9 Timestamp of tree: Sun, 18 Mar 2007 09:20:01 +0000 ccache version 2.4 [enabled] dev-java/java-config: 1.3.7, 2.0.31 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ http://85.25.128.62 http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LINGUAS="de en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X aac acpi alsa apache2 arts asf berkdb bitmap-fonts bluetooth bzip2 cairo cddb clamav cli cracklib crypt css cups dri dvd dvdr dvdread dynamicplugin exif fam fastbuild fortran gd gdbm gif gpm gtk gtk2 hdaps i8x0 iconv ipv6 isdnlog jai java javascript jimi jpeg libg++ logrotate madwifi mbox midi mikmod mmx mmxext mp3 mp4 mysql ncurses nls no-seamonkey nptl nptlonly nsplugin opengl pam pcre pdf perl png ppds pppd python readline real reflection rtc samba session spl sse sse2 ssl subversion svg tcpd tiff truetype truetype-fonts type1-fonts unicode userlocales win32codecs x86 xml xorg xpm zlib" ALSA_CARDS="intel8x0 intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="vga radeon" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
As I noted in separate email, one must use the -stdin option to make this work. I just added a warning message to cover the case where neither "-" or "-stdin" are given, and there is remaining data to process (for 2.8.6dev.5).
Hhm, after some more posts to the lynx developer I found out that lynx under Cygwin/Windows XP works fine, but not under Gentoo. That's why here's the 2nd attempt to solve this bug: The following (as an example) doesn't work at my system :-( (1) wget http://www.gentoo.org/doc/en/handbook/handbook-x86.xml (2) lynx -dump -stdin < handbook-x86.xml Instead this works fine : lynx http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
After a (longer) discussion with the lynx people the following work around solves the issue for me : tfoerste@n22 ~/devel/wireshark/trunk/docbook $ sdc Makefile Index: Makefile =================================================================== --- Makefile (revision 22549) +++ Makefile (working copy) @@ -25,7 +25,7 @@ # This could also be "lynx", or "true" if neither elinks nor lynx is installed #HTML2TXT=elinks -dump -dump-width 72 #HTML2TXT=links -dump -width 72 -HTML2TXT?=lynx -dump -width=72 -nolist -stdin +HTML2TXT?=lynx -dump -width=72 -nolist -stdin -force-html