[Webfunds-devel] cross-platform Line endingscross-platform line endings

Ian Grigg iang@systemics.com
Wed, 16 Aug 2000 17:26:55 -0400


Edwin Woudt wrote:

> > Uniform line endings is more a matter of communications,
> > once it is saved with the wrong line ending for the platform,
> > strange things start to happen with other tools & comms.
> >
> > These are lower priority.
> 
> What exactly is the bug here? OpenPGP removes trailing spaces and applies
> uniform line endings before signing, so what's the problem?

the Wizard saves the file to disk in OpenPGP internal format,
which means that you always get CR/NL for the end of every line.

This works fine on DOS, but on MAC and UNIX means the file has
the wrong line endings.

So the fix is to convert it to canonical format before saving
the file.  Now this could be done out of Contract.java which
has some code to do this.  I could look at that.  Or it could
be done by the Wizard code, in which case I'm not sure what the
bext way to do this is.

Possibly, via Contract makes more sense, that is after all what
this code is about producing.

-- 
iang