Platform Line Termination?
R. A. Harmon
harmonra at webname.com
Sun Feb 6 22:48:36 UTC 2000
At 07:41 PM 2/6/00 +0100, Stefan Matthias Aust wrote:
>I'd suggest to not depend on any encoding. It might even change within the
>file. All you can depend on is, that CR will prepend LF. And don't depend
>the line end encoding on the platform! I want to read unix files on
>Windows, too.
>
>For one of my parsers I use the following methods
[excellent exaple snipped]
I read the files in a manner similar to your examples. The difficulty
surfaces in writing files that will be used by other tools such as RCS, text
editors, etc.
I wanted to write the files using the appropriate platform line termination
convention unless specifically set to use a different one. This is how I've
seen it done on other dialects, seems reasonable to me, and would ease using
the file with other tools.
Thanks,
--
Richard A. Harmon "The only good zombie is a dead zombie"
harmonra at webname.com E. G. McCarthy
Spencer, Iowa
More information about the Squeak-dev
mailing list
|