This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: read-line and CRLF
- To: brlewis at alum dot mit dot edu
- Subject: Re: read-line and CRLF
- From: Per Bothner <per at bothner dot com>
- Date: 06 Jun 2000 13:17:20 -0700
- Cc: kawa at sourceware dot cygnus dot com
- References: <200006062014.QAA21097@tux.eatonvance.com>
brlewis@alum.mit.edu writes:
> I'm doing some SMTP, which defines EOL markers as CRLF. When I use
> Kawa's read-line procedure, I get blank lines between each line,
> presumably because it first reads up to the \r and next time up to the
> \n. Is this fixable?
Hm. There already is code in kawa/standard/read_line.java to
handle CRLF. If it doesn't could you try to debug it?
There is also code in gnu/text/LineBufferedReader.java to
handle CRLF, but you may need to call setConvertCR(true) first.
The difference is that if setConvertCR(true) is called, then
CRLF (or CR not followed by LF) gets converted to LF, at the
character level. However, read-line is supposed to convert
CRLf to LF whether or not setConvertCR(true) has been called,
so if it doesn't work, it would be great if you could figure out why.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/