Menu

#572 UnRtf fails when redirecting output on Win10

Chess
open
nobody
None
1
2019-04-14
2019-04-14
Greg Lowney
No

When I run the current version of unrtfthis on my Win10 64-bit system if works on all tested RTF files as long as the output is going to the console. However, if I redirect the output to a file or pipe it including piping to another program then the resulting file is zero bytes long for about half of the tested input files.

This is using the current build of GnuWin UnRtf, version 0.19.3 (per http://gnuwin32.sourceforge.net/packages/unrtf.htm).

Of the sample set of RTF files, 177 displayed this bug and 186 did not. All were created using Word 2003 Professional as they all contain the string "{\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}". One such failing document is attached to this ticket.

This problem does not reproduce on my Windows 7 64-bit system using the same documents and unrtf executable file. TMP, TMPDIR, and HOME environment variables were identical and valid on both systems. msvcrt.dll is on both systems (albeit different versions).

Sample command that always works:

unrtf file.rtf

Sample commands that always fail for about half the documents:

unrtf file.rtf > file.xml
unrtf file.rtf | more

Here is an output log; note:

C:\tmp\wilum-rtf>unrtf "Centipede Press.rtf"
This is UnRTF, version 0.19.3
By Dave Davey and Marcos Serrou do Amaral
Original Author: Zach T. Smith
Processing Centipede Press.rtf...














Centipede Press

2565 Teller Court

Lakewood, CO 80214



C:\tmp\wilum-rtf>
C:\tmp\wilum-rtf>unrtf "Centipede Press.rtf" | more
This is UnRTF, version 0.19.3
By Dave Davey and Marcos Serrou do Amaral
Original Author: Zach T. Smith
Processing Centipede Press.rtf...

C:\tmp\wilum-rtf>

1 Attachments

Discussion