From: Noam P. <npo...@us...> - 2011-09-29 18:49:21
|
On Mon, Sep 26, 2011 at 6:22 AM, Ming Chen <cim...@ya...> wrote: > In all output files, the line endings have strange format. I think they should be 00 0D 00 0A or 0D 00 0A 00. > > I am using the latest windows version (1.2.1). My OS is Win7 64bit. > > Could someone help to check this? Yes, I think I see what is happening: the libxml output routine is writing just a newline character and expecting the c-runtime to do the conversion to the system specific line ending. Problem is, nobody told the c-runtime that the output is in UTF16, so it's just waiting until it sees an ascii newline (0A) and then it adds a carriage return (0D). Unfortunately, it seems there is no way to tell Windows to use switch stdout to UTF16 until the VS2005 c-runtime. XMLStarlet uses mingw, so the best I can do is change to binary mode, meaning the line endings will be 00 0A. |