[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25459: sed bug: native sed-4.3 appends excessive carriage-returns wh
bug#25459: sed bug: native sed-4.3 appends excessive carriage-returns when run in binary mode on windows
Mon, 16 Jan 2017 13:03:01 +0300
Steps to reproduce.
First it's needed to build native sed.exe on windows.
It's hard, but possible, I've done this:
(Note: don't apply sed-4.3-src.patch in these instructions - it fixes
reported bug and build problems with Visual Studio 2008)
Now, if we have working native sed.exe, from cmd.exe
1) create a file containing a line terminated with '\n':
check "test" contents, dump it:
00000000: 310d 0a 1..
2) process file "test" with sed in binary mode:
sed\sed.exe -b "" test > test1
dump resulting file "test1":
00000000: 310d 0d0a 1...
As we can see, there is excessive '0d' in result.
To fix this bug, stdout should be set to binary mode, for example by
applying attached patch.
Michael M. Builov
Description: Binary data
- bug#25459: sed bug: native sed-4.3 appends excessive carriage-returns when run in binary mode on windows,
Michael Builov <=