Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!spool2.mu.edu!sdd.hp.com!usc!orion.oac.uci.edu!ucivax!gateway From: OSmith@acorn.co.UK (Owen Smith) Newsgroups: comp.protocols.iso.x400 Subject: Re: CRLF Message-ID: <4756@acorn.co.uk> Date: 23 Jan 91 21:07:51 GMT References: <9101222001.AA17316@polya.Eng.Sun.COM> Distribution: comp Organization: Acorn Computers Ltd, Cambridge, England Lines: 35 Approved: usenet@ICS.UCI.EDU x-attn: jns X-Previously-To: w@acorn.co.UK ReSent-From: Jerry Sweet ReSent-To: mhsnews@ICS.UCI.EDU In article <9101222001.AA17316@polya.Eng.Sun.COM> pv@eng.sun.COM (Peter Vanderbilt) writes: >But as far as the to-be-defined external body parts, I'd recommend >allowing lines to be delimited by either LF or CRLF. The reason for >this is to allow the mail system to move application data transparently >from user to user, in particular between a user on an operating system >that uses LF and a user on one that uses CRLF. I'd rather see each line encoded as a seperate ASN.1 string, with no delimiters in ie. implicit delimiter at the end of each string. Thus the target system can put whatever delimiters it needs in, and doesn't have to hunt for them. There are some systems that like just CR and nothing else, so your CRLF or LF scheme falls flat and the software would have to hunt for all occurences of LF or CRLF. It can be done, but having each line as a seperate ASN.1 string makes things a lot easier. Also, having seperate strings makes memory-efficient processing easier. You can pull one of the strings into memory, process it, and write the results back out to disk before getting the next string. You CAN do this when faced with a single 25 MegaByte ASN.1 primitive string for the whole document, but it is easier with lots of smaller strings. Also, I'm a bit worried about this trend towards "just carry the whole thing as binary data" approach. What if the "whole thing" contains integers for formatting information as well as text? And what if those integers are stored in an ambiguous byte ordering? ASN.1 was invented to help us do this sort of thing, so why not use it instead of inventing our own weird and wonderful schemes. Owen. The views expressed are my own and are not necessarily those of Acorn.