🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #67768

Re: Mac newlines

#67768
From: iMeowbot
Date: Mon, 26 Jan 2004 05:31
37 lines
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 =)
Technical Details
Message-ID: <iMeowbot-DB52E9.00313126012004@news.verizon.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn11feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!7052aa2c!not-for-mail
References: <1-WdnewI8emEBIndRVn-ug@giganews.com>

Show Full Headers
Complete Article Headers
Message-ID: <iMeowbot-DB52E9.00313126012004@news.verizon.net>
Subject: Re: Mac newlines
Date: Mon, 26 Jan 2004 05:31:31 GMT
From: iMeowbot <iMeowbot@mac.com>
References: <1-WdnewI8emEBIndRVn-ug@giganews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn11feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!7052aa2c!not-for-mail
Newsgroups: news.software.nntp
Mail-Copies-To: nobody
Organization: uJane
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X)
X-Meow: Wouf
X-No-Repost: yes
Injector-Info: http://www.halfbakery.com/idea/Tarantula_20injector
X-Face: GoP_M4IkjWG/y%ym?jo5gyL.y/nBJmU+$gW+nH>P1jU\r6ZePn|suM%F2'kMu
 *hx4-uRHbyV'nd1sm'W+U/N@bvLY%O+kw6u%R9[vee-p.xk}X*8C{E-Dx$|<)_WSTBHl
 }w8$pvbD=<)p|i*imBJ*.eEYlX[]_+YN
Lines: 37
NNTP-Posting-Host: 68.160.7.172
X-Complaints-To: abuse@verizon.net
X-Trace: nwrdny01.gnilink.net 1075095091 68.160.7.172 (Mon,
NNTP-Posting-Date: Mon, 26 Jan 2004 00:31:31 EST