This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: read-line and CRLF


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]