Thread View: news.software.nntp
16 messages
16 total messages
Started by Bart Crane
Wed, 06 Nov 2002 06:52
YENC and CTRL-Z
Author: Bart Crane
Date: Wed, 06 Nov 2002 06:52
Date: Wed, 06 Nov 2002 06:52
34 lines
1830 bytes
1830 bytes
Hello, Is this the correct place to voice a desire that the YENC protocol be modified so that it treats CTRL-Z as a "Critical Character", causing it to be escaped so that it is not present in the NNTP stream? CTRL-Z in a text stream is treated as End Of File on DOS/Windows systems. If any YENC-encoded content finds its way into the download stream, standard text-processing utilities like sed and grep terminate early when they encounter the CTRL-Z. I have notified yenc.org of this situation, but have received no response. Also, no response from a vendor of a popular news-reader/-poster software program that supports YENC. Escaping CTRL-Z will hardly affect the benefits of YENC. CTRL-Z has been documented to have this behavior on text-streams evern since DOS first arrived. Thank you. Bart.
Re: YENC and CTRL-Z
Author: those who know me have no need o...
Date: Wed, 06 Nov 2002 14:13
Date: Wed, 06 Nov 2002 14:13
17 lines
1663 bytes
1663 bytes
in news.software.nntp i read: >Is this the correct place to voice a desire that the YENC protocol be >modified so that it treats CTRL-Z as a "Critical Character", causing it to >be escaped so that it is not present in the NNTP stream? probably not. but it's not likely to do any harm either. >CTRL-Z in a text stream is treated as End Of File on DOS/Windows systems. not if the stream is opened in binary mode, as is only sensible. yenc'd articles are not really text, they only resemble text sufficiently to pass through nntp. attempting to treat them as if they are text is a mistake. -- bringing you boring signatures for 17 years
Re: YENC and CTRL-Z
Author: Curt Welch
Date: Wed, 06 Nov 2002 15:31
Date: Wed, 06 Nov 2002 15:31
37 lines
2589 bytes
2589 bytes
those who know me have no need of my name <not-a-real-address@usa.net> wrote: > in news.software.nntp i read: > > >Is this the correct place to voice a desire that the YENC protocol be > >modified so that it treats CTRL-Z as a "Critical Character", causing it > >to be escaped so that it is not present in the NNTP stream? > > probably not. but it's not likely to do any harm either. news.software.readers would be a slightly better place to bring up the issue. > >CTRL-Z in a text stream is treated as End Of File on DOS/Windows > >systems. > > not if the stream is opened in binary mode, as is only sensible. yenc'd > articles are not really text, they only resemble text sufficiently to > pass through nntp. attempting to treat them as if they are text is a > mistake. Yeah, but it's almost-binary data embeded in text so it does get processed with text tools so he does have a point there. yEnc requires newlines to be added to keep lines short already for the same reason - i.e. to allow tools (mostly newsreaders) treating it like text to continue working. And many of those same newsreaders save articles to text files. Sounds resonable to me, but getting everyone to change their encoders for someting so minor might be somewhat hard. However, the one encoder I wrote I just changed to escape ^Z so that's one down, 800 to go. :) -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: YENC and CTRL-Z
Author: J.B. Moreno
Date: Thu, 07 Nov 2002 02:47
Date: Thu, 07 Nov 2002 02:47
26 lines
2053 bytes
2053 bytes
In article <20021106103156.562$Xr@newsreader.com>, Curt Welch <curt@kcwc.com> wrote: > those who know me have no need of my name wrote: > > in news.software.nntp i read: -snip- > > >CTRL-Z in a text stream is treated as End Of File on DOS/Windows > > >systems. > > > > not if the stream is opened in binary mode, as is only sensible. yenc'd > > articles are not really text, they only resemble text sufficiently to > > pass through nntp. attempting to treat them as if they are text is a > > mistake. > > Yeah, but it's almost-binary data embeded in text so it does get processed > with text tools so he does have a point there. yEnc requires newlines to > be added to keep lines short already for the same reason - i.e. to allow > tools (mostly newsreaders) treating it like text to continue working. And > many of those same newsreaders save articles to text files. No, yEnc requires newlines to be added in order to make sure it passes through NNTP. -- J.B. Moreno
Re: YENC and CTRL-Z
Author: Curt Welch
Date: Thu, 07 Nov 2002 04:03
Date: Thu, 07 Nov 2002 04:03
36 lines
2881 bytes
2881 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote: > No, yEnc requires newlines to be added in order to make sure it passes > through NNTP. That's the same thing in my mind. The news servers that have problems with long lines are the ones that were written with the assumption they were dealing with text and not binary data. CR LF is a _text_ thing and the only reason to add them is to allow software that thinks it is working with text to continue working. But I also thought I saw reports of some newsreaders which could not deal with saving yEnc articles with huge lines (or maybe they just corrupted the data if the lines were greater than their line buffers???) ^Z has never been a problem with news servers that I know of, so dealing with ^Z is a different realm of "text problem" for sure. But it's still a text problem. Newsreaders like to save articles to files and it just seems wrong to me that "grep" might stop half way through a 1000 article article mbox file because it finds a ^Z in a yEnc article. I don't know how big this problem is so it's hard to say if the effort to get yEnc encoders modified and the overhead it will add for everyeone is worth the trouble, but it sounds like a reasonable request to me. The ^Z "problem" was mostly removed with the swtich from CP/M to MS-DOS. It was only left in DOS for backward compatibilty reasons. There's no dount that it's high time that problem stopped "biting" us. So from that perspective, I don't mind all that much if utilities still following the ^Z convetion do have problems. :) -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: YENC and CTRL-Z
Author: greg andruk
Date: Thu, 07 Nov 2002 04:30
Date: Thu, 07 Nov 2002 04:30
20 lines
2224 bytes
2224 bytes
curt@kcwc.com (Curt Welch) wrote: > "J.B. Moreno" <planb@newsreaders.com> wrote: >> No, yEnc requires newlines to be added in order to make sure it passes >> through NNTP. > That's the same thing in my mind. The news servers that have problems with > long lines are the ones that were written with the assumption they were > dealing with text and not binary data. The usual suspects with long line problems are nnrpd and reference nntpd. In the case of nntpd, it's a bug that inserts a linefeed at the end of 512-byte buffer chunks. In the case of nnrpd, the limit is there for compatibility with SMTP (moderated groups and gateways make it relevant). RFC 821 did include a big note surrounded by asterisks saying that limiting lines to 998+CRLF was a bad idea, but also allowed a limit and even picked a number, so...
Re: YENC and CTRL-Z
Author: Russ Allbery
Date: Thu, 07 Nov 2002 04:41
Date: Thu, 07 Nov 2002 04:41
17 lines
1764 bytes
1764 bytes
greg andruk <gja@meowing.net> writes:
> In the case of nnrpd, the limit is there for compatibility with SMTP
> (moderated groups and gateways make it relevant).
Oh, that's interesting. I didn't know that.
In CURRENT, the limit is gone. I wonder if we need to think about what to
do when handing messages off to moderated groups. I know sendmail still
has problems with long lines.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: YENC and CTRL-Z
Author: Curt Welch
Date: Thu, 07 Nov 2002 05:14
Date: Thu, 07 Nov 2002 05:14
27 lines
2447 bytes
2447 bytes
Russ Allbery <rra@stanford.edu> wrote: > greg andruk <gja@meowing.net> writes: > > > In the case of nnrpd, the limit is there for compatibility with SMTP > > (moderated groups and gateways make it relevant). > > Oh, that's interesting. I didn't know that. > > In CURRENT, the limit is gone. I wonder if we need to think about what > to do when handing messages off to moderated groups. I know sendmail > still has problems with long lines. That's an interesting point. Do you know what type of problems sendmail has? Does it crap out and not deliver the e-mail or does it just corrupt it somehow? To some extent, the probelems of corrupting the message if, say, it has lines over 1K in length, doesn't really bother me. If you switch from one transport to another like that you expect problems when you stray outside the "norm" too far, so that doesn't concern me as much. But if the "problem" is that messages tend to vanish into the either without notice, that's more of an issue in my mind. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: YENC and CTRL-Z
Author: J.B. Moreno
Date: Thu, 07 Nov 2002 05:24
Date: Thu, 07 Nov 2002 05:24
19 lines
1804 bytes
1804 bytes
In article <20021106230305.402$to@newsreader.com>, Curt Welch <curt@kcwc.com> wrote: -snip why yEnc has "short" lines- > But I also thought I saw reports of some newsreaders which could not deal > with saving yEnc articles with huge lines (or maybe they just corrupted the > data if the lines were greater than their line buffers???) I recall something like that, but if my rather vague memory serves, it was some DOS editor, not one of the newsreaders. (At the time there wasn't all that many newsreaders that supported it, and I know that Xnews and Thoth don't have a problem with longer lines). -- J.B. Moreno
Re: YENC and CTRL-Z
Author: Russ Allbery
Date: Thu, 07 Nov 2002 05:27
Date: Thu, 07 Nov 2002 05:27
19 lines
1947 bytes
1947 bytes
Curt Welch <curt@kcwc.com> writes:
> Russ Allbery <rra@stanford.edu> wrote:
>> In CURRENT, the limit is gone. I wonder if we need to think about what
>> to do when handing messages off to moderated groups. I know sendmail
>> still has problems with long lines.
> That's an interesting point. Do you know what type of problems sendmail
> has? Does it crap out and not deliver the e-mail or does it just corrupt
> it somehow?
Corrupts it. Inserts ! and a newline at some random point.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: YENC and CTRL-Z
Author: greg andruk
Date: Thu, 07 Nov 2002 06:24
Date: Thu, 07 Nov 2002 06:24
11 lines
1959 bytes
1959 bytes
Russ Allbery wrote: > In CURRENT, the limit is gone. I wonder if we need to think about what to > do when handing messages off to moderated groups. I know sendmail still > has problems with long lines. It would be nice would beable to let clients worry about that, but too many newsreaders don't even bother to check if groups are moderated, and the whole spamblock address mangling thing makes it really tough to get feedback to users about moderated group problems, and.... ugh.
Re: YENC and CTRL-Z
Author: Dr.Ruud
Date: Thu, 07 Nov 2002 10:16
Date: Thu, 07 Nov 2002 10:16
37 lines
2090 bytes
2090 bytes
Mike Horwath skribis: > what's with all this issue dealing with ^Z? > The issue is ^Z-Enter dealing with DOS and CPM. > ^Z by itself does nothing. > > Try it, open a DOS window: > > copy con somefile.txt > lksjdflkwhbhwerlkj > ^Zlkjsdflkjwqhwelrkj > ^Z-Enter 'copy con' defaults to text-mode. Try copy /b con somefile2.txt (in a Win2K-DOS-box it won't even create the file in binary mode) As for your example, the first entered line with an embedded Ctrl-Z, closes the file here. If you check the file, you'll see that the Ctrl-Z is the last character that is written to the file. In binary mode this is all no problem, check copy /b somefile.txt con and you'll see the Ctrl-Z on the screen (as some character, depending on your display settings etc.). A Ctrl-Z in a text-stream marks the end-of-text, so that any filler-bytes can be ignored. -- Affijn, Ruud
Re: YENC and CTRL-Z
Author: Curt Welch
Date: Thu, 07 Nov 2002 15:59
Date: Thu, 07 Nov 2002 15:59
14 lines
1844 bytes
1844 bytes
Russ Allbery <rra@stanford.edu> wrote: > Curt Welch <curt@kcwc.com> writes: > > That's an interesting point. Do you know what type of problems > > sendmail has? Does it crap out and not deliver the e-mail or does it > > just corrupt it somehow? > > Corrupts it. Inserts ! and a newline at some random point. Never would have guessed that! -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: YENC and CTRL-Z
Author: Curt Welch
Date: Thu, 07 Nov 2002 16:04
Date: Thu, 07 Nov 2002 16:04
30 lines
1864 bytes
1864 bytes
drechsau@visi.com (Mike Horwath) wrote:
> what's with all this issue dealing with ^Z?
>
> The issue is ^Z-Enter dealing with DOS and CPM.
>
> ^Z by itself does nothing.
>
> Try it, open a DOS window:
>
> copy con somefile.txt
> lksjdflkwhbhwerlkj
> ^Zlkjsdflkjwqhwelrkj
> ^Z-Enter
>
> :)
On Windows 95:
C:\WINDOWS>copy con: test.txt
this is a ^Z test
1 file(s) copied
C:\WINDOWS>type test.txt
this is a
C:\WINDOWS>
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: YENC and CTRL-Z
Author: Curt Welch
Date: Thu, 07 Nov 2002 16:21
Date: Thu, 07 Nov 2002 16:21
47 lines
2322 bytes
2322 bytes
drechsau@visi.com (Mike Horwath) wrote: > what's with all this issue dealing with ^Z? > > The issue is ^Z-Enter dealing with DOS and CPM. > > ^Z by itself does nothing. > > Try it, open a DOS window: And for some more testing (^Z and ^M added to cat output to show what's there) % cat test.txt this is a ^Z test^M and so is this!^M % ls -l test.txt -rw-r--r-- 1 root wheel 35 Nov 7 11:08 test.txt % od -c test.txt 0000000 t h i s i s a 032 t e s t 0000020 \r \n a n d s o i s t h i s 0000040 ! \r \n 0000043 FTP the 35 byte file over to windows 95 in binary mode: C:\WINDOWS>dir test.txt TEST TXT 35 11-07-02 11:09a test.txt C:\WINDOWS>type test.txt this is a C:\WINDOWS>find "this" test.txt ---------- test.txt this is a C:\WINDOWS>find "and" test.txt ---------- test.txt C:\WINDOWS> -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: YENC and CTRL-Z
Author: Jeffrey M. Vinocur
Date: Thu, 07 Nov 2002 20:25
Date: Thu, 07 Nov 2002 20:25
23 lines
1845 bytes
1845 bytes
In article <20021107105937.918$cp@newsreader.com>, Curt Welch <curt@kcwc.com> wrote: >Russ Allbery <rra@stanford.edu> wrote: >> Curt Welch <curt@kcwc.com> writes: >> > That's an interesting point. Do you know what type of problems >> > sendmail has? Does it crap out and not deliver the e-mail or does it >> > just corrupt it somehow? >> >> Corrupts it. Inserts ! and a newline at some random point. > >Never would have guessed that! And the fun bit is the subtle bugs this introduces when you transport text files (well, code) by plopping them into the middle of an email...and every once in a while one of those text files is using a Mac newline convention. Which appears as a single long line to unix tools, of course. -- Jeffrey M. Vinocur jeff@litech.org
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