Do you really need to know what OS the file came from, or are you just looking to get the same input from a file saved on different platforms? I've never needed the former, but solutions for the latter problem are given in a number of places around PM; check out this
Q&A, and this
code snippet which may be relevant.