Calanth is correct to tell you that there simply is no new line character. Depending on your operating system, "\n" is silently translated to {'\c','\r'}, {'\r','\c'}, {'\r'}, or {'\c'} , So, it's some combination of "carriage return" (usually 0x0D) and "line feed" (usually 0x0A). For us lucky stiffs that grew up with Microsoft, \n has always meant "\0x0D\0x0A", but it really did depend on the OS (Mac and Unix were different).
What I do to solve this issue if I must look a character at a time, then I will look for either 0x0D or 0x0A. And if you do find either, you must then look at the next character for the other and skip over it. (If 0x0D, then check for 0x)A, or vice versa). Two 0x0D in a row or two 0x0A in a row usually does mean two lines, one of them empty.
Yeah yeah... it blows. This is just a case where something invented 20 years ago is still biting us. And if you are really interested in who thought this crazy stuff up -- CR literally used to tell an electric typewriter to send its print head back to the far left of the current line. LF told the roller to scroll the paper one line. You needed this seperation because to underline a word, you would send a carriage return, then a bunch of spaces and underscore marks before you sent a line feed. To do a bold, you would send carriage return and retype the line over again on top of the original line before doing a line feed. Fun times.