catala icon indicating copy to clipboard operation
catala copied to clipboard

Handle CRLF line endings

Open denismerigoux opened this issue 1 year ago • 1 comments
trafficstars

The lexer (https://github.com/CatalaLang/catala/blob/master/compiler/surface/lexer.cppo.ml) is not resilient to CRLF (Windows) line endings (\r\n), basically all occurences of \n should be checked to see if they also work with \r\n.

denismerigoux avatar Apr 08 '24 13:04 denismerigoux

We might want to handle them anyway, but note that on Windows, conversion should happen automatically (since we use open_in and not open_in_bin) and the lexer would only see \n even if the actual file contains \r\n. So the issue here is with Windows-style files appearing in a Linux environment.

AltGr avatar Jun 11 '24 09:06 AltGr