> From: Gavin Smith <[email protected]> > Date: Sun, 4 Oct 2026 10:13:30 +0100 > Cc: Patrice Dumas <[email protected]>, [email protected] > > On Sat, Oct 03, 2026 at 08:25:58PM +0300, Eli Zaretskii wrote: > > > Before turning to tests, I would like that we determine what should be > > > expected for native Windows texi2any. > > > > > > 1) input > > > > > > How should CRLF be treated in input for native Windows? Should they be > > > treated as a logical end of line (the same as a LF in posix systems), or > > > as a CR character followed by an end of line? > > > > The former. It should be okay to have Texinfo source file with CRLF > > end-of-line, IMO, because they can be produced by editors which > > default to that, or maybe even support only that. > > > > > 2) output > > > > > > For Info output there is no need for discussion, it leans towards being > > > binary, CR is a character among others, only LF is an end of line. The > > > output is naturally done in binary mode. > > > > > > For LaTeX, HTML, DocBook and plaintext..., we have textual output files. > > > Should the end of line in output files be CRLF or LF? > > > > In general, IMO the preference should be to produce native EOL format, > > because the output files can be read by arbitrary native tools, some > > of which might have problems with Unix-style newline-only EOL format. > > For Info files, you have decided to use Unix-style EOLs due to > > complications in byte counting (which are solvable, but are still > > complications). These complications don't exist in other formats, > > AFAIU. > > > > FWIW I agree with both points above and my understanding was that texi2any > already behaved like this on MS-Windows. (Cygwin may be different as that > is supposed to be a Unix-like environment. I don't know for sure about MSYS2.
Cygwin _is_ different: it emulates a Posix environment, so Texinfo built with Cygwin tools is supposed to behave like it does on Unix. That is, any CR characters, if not removed by application code, might cause trouble if the application is not ready to deal with CRLF EOLs. MSYS2 behaves like Cygwin (it's a fork of Cygwin), but that is not very interesting because MSYS2 programs aren't supposed to be used for production, only for building Windows programs. So what an MSYS2 build of texi2any does is IMO not very important because we aren't supposed to meet such a creature in the wild.
