Input/Output Learning Mode

What should you do if your script is having problem recognizing file endings from a text file saved on a platform different from the one you’re reading it on?