Closed keegandent closed 3 years ago
Wow, all these years no one has questioned the line endings. I could sworn that \r\n
is what the games used, but maybe that was only EU3 or maybe I wanted the files that people opened in Notepad to "look right" 😉 .
You're right that they solely use \n
now. You're not seeing any problems arise from using \r\n
, right? I have a couple scripts that produce files with \r\n
and EU4 and CK3 appear to be loading them file.
It seems reasonable to change our behavior to match paradox's.
I verified it doesn't seem to impact Stellaris saves either. So much for what the wiki says. Loading and re-saving a file in Stellaris with CRLF endings does produce a file with LF endings. I'll open the PR anyway.
Apologies if I'm missing some step that converts back into
\n
, but it looks like the current code tries to save the pdox files with\r\n
line endings. As far as I can tell, EU4, CK2, and Stellaris all use\n
.If I change the FileTest.txt to LF, the unit test fails (which makes sense).
I'd be more than happy to submit a PR, assuming there's no Pdox game that uses CRLF for which compatibility must be preserved.