Thread View: news.software.nntp
3 messages
3 total messages
Started by Pete
Mon, 26 Jan 2004 04:35
Mac newlines
Author: Pete
Date: Mon, 26 Jan 2004 04:35
Date: Mon, 26 Jan 2004 04:35
15 lines
1603 bytes
1603 bytes
Dear people, I was wondering whether someone could tell me what the proper newline character sequence should be for a Mac OS reader. Now, a local news server here uses 0x0A (UNIX style) as newline; others use 0x0D and 0x0A together (DOS style). But MT-Newswatcher, for Macintosh, really trips over the UNIX style newlines. Should I always use a 0D0A pair, for both headers and body? Or what? Thanks! - Pete
Re: Mac newlines
Author: iMeowbot
Date: Mon, 26 Jan 2004 05:31
Date: Mon, 26 Jan 2004 05:31
37 lines
3095 bytes
3095 bytes
In article <1-WdnewI8emEBIndRVn-ug@giganews.com>, "Pete" <nospam@gobotherverisign.com> wrote: > I was wondering whether someone could tell me what the proper newline > character sequence should be for a Mac OS reader. For traditional Mac applications, the native terminator is CR. For Unix programs running within the BSD subsystem, it's LF. Ha, you wanted an easy answer! > Now, a local news server here uses 0x0A (UNIX style) as newline; That might be how it stores articles on disk, but in NNTP the endings should always be translated to CRLF or that server's broken. > others use > 0x0D and 0x0A together (DOS style). It's really telnet style in this case =) But CRLF is what should always be used in an NNTP transaction, regardless of how the articles are stored locally. > But MT-Newswatcher, for Macintosh, > really trips over the UNIX style newlines. Should I always use a 0D0A pair, > for both headers and body? Or what? It depends on what you intend to do with the locally stored articles. If you expect to use them mostly with Mac tools, by all means do the translation to the native CR. If you're just intending to use the data with NNTP and SMTP, and for use internally to your program, CRLF will probably be easier because you can avoid the translations. Just to make things more perpexing,a CR that appears without a trailing LF in NNTP generally gets preserved. Preserving that as distinct from a real line ending really doesn't work out if you're storing text in native Mac format -- the best bet is not to transmit those in the first place =)
Re: Mac newlines
Author: J.B. Moreno
Date: Tue, 27 Jan 2004 16:19
Date: Tue, 27 Jan 2004 16:19
20 lines
1799 bytes
1799 bytes
Pete <nospam@gobotherverisign.com> wrote: > Dear people, > > I was wondering whether someone could tell me what the proper newline > character sequence should be for a Mac OS reader. Internally it doesn't matter what you use as the end of line character, but anytime you're communicating with someone else, then regardless of their platform or yours, it should CRLF. This is true regardless of whether you're doing NNTP, SMTP, POP, HTTP, telnet, SSH or whatever else suits your fancy. So, if you're currently using something other than CRLF and MTNW is having trouble with that, it's because MTNW is doing the right thing, and you're not. -- J.B. Moreno
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads