Article View: news.software.readers
Article #71299Re: Which RFC & Multi Part Binaries
From: Charles Kincaid
Date: Tue, 30 Jan 2001 16:34
Date: Tue, 30 Jan 2001 16:34
48 lines
2792 bytes
2792 bytes
jrhende@hotmail.com (jrh) wrote in <Xns90367BF5D16C9jrhendehotmailcom@64.152.100.90>: >Karl Kleinpaste <karl@charcoal.com> wrote in ><vxkzogclsug.fsf@cinnamon.vanillaknot.com>: > >>jrhende@hotmail.com (jrh) writes: >>> What encoding scheme is being used in the following snippet of ASCII? >>> begin 644 Steel Magnolias 2.c22 >> >>That's "uuencoded". >> >>> Anyone know of some C/C++ source code that I could get that would >>> recreate this ASCII to Binary? >> >>Find uuencode.c in any search engine. >> > >I have that file. > >Is it base64 or simple. The base64 code is expecting a line to end >with a "=" which doesn't make sense. And, it isn't treating the M char >as a special case as I think it is some kind of line type specifier. Your sample is UUENCODEd. The M is a character that tells how many characters are on this line. Base64 does not care (always a multiple of 4). Base64 uses the equal sign (=) to pad strings that don't come out to a multiple of 4 characters when encoded. Base64 turns 3 bytes of binary data into 4 ASCII characters. What if what you are encodeing is not a multiple of 3 bytes in length? You wind up with 1 or 2 characters to encode and that encoded output must be a multiple of 4 characters. The encode routine pads the output with equal signs. The equal signs should only come at the end of the whole encoded block and NOT at the end of a line. Many versions of Base64 decode routines that I have seen will treat the first equal sign as an end of file marker. Be careful of this if yu are writing your own routines. UUENCODE takes care of this problem by sending a short line of text (one that does not start with an M). -- ATB Charles Kincaid
Technical Details
Message-ID:
<Xns90396A890BEB73145926@172.17.1.62>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.direct.ca!look.ca!nntp.giganews.com!nntp2.aus1.giganews.com!NetNews1!attws2!attsl2!attsl1!ip.att.net!news.dsionline.com!172.17.90.124References:
<Xns90367543F29F1jrhendehotmailcom@64.152.100.90> <vxkzogclsug.fsf@cinnamon.vanillaknot.com> <Xns90367BF5D16C9jrhendehotmailcom@64.152.100.90>Show Full Headers
Complete Article Headers
Message-ID: <Xns90396A890BEB73145926@172.17.1.62> Subject: Re: Which RFC & Multi Part Binaries Date: Tue, 30 Jan 2001 16:34:54 +0000 From: kincaic@NAPSswbellSPAM.nOt (Charles Kincaid) References: <Xns90367543F29F1jrhendehotmailcom@64.152.100.90> <vxkzogclsug.fsf@cinnamon.vanillaknot.com> <Xns90367BF5D16C9jrhendehotmailcom@64.152.100.90> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.direct.ca!look.ca!nntp.giganews.com!nntp2.aus1.giganews.com!NetNews1!attws2!attsl2!attsl1!ip.att.net!news.dsionline.com!172.17.90.124 Newsgroups: news.software.readers Organization: dot_dot_dot_dash_dash_dash_dot_dot_dot.com User-Agent: Xnews/M3 NNTP-Posting-Host: 172.17.90.124 X-Trace: 30 Jan 2001 10:34:54 -0600, 172.17.90.124 Lines: 47