How to identify/handle text file newlines in Java?
- by rafrafUk
Hi Everyone!
I get files in different formats coming from different systems that I need to import into our database. Part of the import process it to check the line length to make sure the format is correct.
We seem to be having issues with files coming from UNIX systems where one character is added. I suspect this is due to the return carriage being encoded differently on UNIX and windows platform.
Is there a way to detect on which file system a file was created, other than checking the last character on the line? Or maybe a way of reading the files as text and not binary which I suspect is the issue?
Thanks Guys !