
We were like migrating and old application to a new architecture. The two files shown in notepad are DAT files. The first file was created by the old application. The second one was created by the “new implementation”.
A little history behind the new implementation: These applications (in the “new implementation”) are supposed to be hosted in a web farm environment. There was a specific application called the payroll – this is the application responsible for the creation to the files shown below. I had used visual studio’s pre-processed text templates to generate the DAT files. At the time there was no web service involved. But later we decided that the creation of such files needs to be centralized.
So we exposed a web service to do this.
Essentially there was no change in logic. I still used the pre-processed templates. But the output of this template was transmitted over the web to the web service. After which the files started appearing like as shown in the 2nd image.
There was no problem before the centralization. So what has happened here? How can I make the DAT file (in the new implementation) look the same as in the old?
This looks like a a carriage return issue. I guess the web service use a UNIX server with Unix style line feeds, and the other file comes from a windows?
In that case, you’ll just have to change endlines into CRLF.
Unix systems use LF (0x0A), when Windows system require CR (0x0D) followed with LF (0x0A), so simply replace LF with CRLF, if it is your issue.