An encoding for newline you’ve never heard of

A file recently turned up from an external partner. Our software was having problems parsing it. I opened it up in TextPad (text editor for Windows) and everything looked fine. Obviously I consider our software to be perfect so I was a little perplexed as how this file could be causing problems...

It turned out there were newline issues. Opening the file in a hex editor revealed the file used \n\n\r for newlines, i.e. 3 bytes.

I am amazed by (at least) the following facts:

P.S. I recently created a nerdy privacy-respecting tool called When Will I Run Out Of Money? It's available for free if you want to check it out.

This article is © Adrian Smith.
It was originally published on 18 Aug 2014
More on: FAIL