September 30th, 2003, 10:18 AM
Dear Seniors...Reading File Problem
Hi fellow programmers, i'm currently having problems with opening certain files using my program. It can't read the carriage return of some of the files which comes from other sources such as Unix. As a result, the display is simply one long straight line which had to be scrolled horizontally...
Is it the problem of binary files? I tried to use Notepad to open the file and the same problem occurs exactly as my program but when i use WordPad, the file opens nicely....please advise
September 30th, 2003, 10:36 AM
It is a difference in styles of carriage returns.
Each major type of OS has its own style
MS = /r/n
*nix = /n
Apple = /r
You have to adjust to the different types of files.
Applications like Notepad will not understand the different return types where as wordpad does.