msolve icon indicating copy to clipboard operation
msolve copied to clipboard

Support input files with dos line endings

Open vneiger opened this issue 1 year ago • 3 comments

This is a suggestion to add support for input files that contain the dos "\r\n" line endings. An example received today was the attached file, run with msolve -f in.ms -o out.ms. files.zip

vneiger avatar Sep 27 '24 16:09 vneiger

msolve does not support Windows natively, Windows users need to use wsl. So why should we support dos file encodings?

ederc avatar Sep 27 '24 19:09 ederc

Editors may write in dos file format whatever the system. We had the case today, received by email, which is where the file in the above zip comes from (the person used ubuntu 22.04). I thought it was more efficient to add a test for '\r' in 3 or 4 lines of some msolve file rather than having to reply to such emails/issues every now and then; but feel free to ignore the PR if you prefer, this is not important.

vneiger avatar Sep 27 '24 20:09 vneiger

I do confirm we received such an email from a colleague using an old version of vim which was generating files with dos format for ending lines. I did not check Vincent's PR yet but it we can handle this, it is good to take I think

mohabsafey avatar Sep 29 '24 19:09 mohabsafey

This feature has been added via #183 and is included in v0.7.3 of msolve.

ederc avatar Oct 14 '24 09:10 ederc