[Webfunds-devel] cross-platform Line endingscross-platform lineendings

Ian Grigg iang@systemics.com
Wed, 16 Aug 2000 21:10:52 -0400


Edwin Woudt wrote:

> I think we all misunderstood eachother... there are two sections in your
> list that deal with line endings (and trailing spaces):
> 
>       I.a)  Contract - all these can be repaired and saved on the fly
> 
>         + no trailing spaces
>         + uniform line endings
> 
>      II.a)  Contract should be written out in local format
>             (with platform line ending, currently has ^M on Unix).
> 
> IMHO, the first one is fixed (the unsigned contract is stripped of all
> trailing spaces and converted to \r\n line endings, because otherwise the
> signatures would not work), the second one is not.

OK, concur!

> Is there a standard way to determine the local format?

I looked but I couldn't find it (the code in webfunds.ricardian is all
read-only and works with the content it has been given, so it assumes
the worst (== any format) ).

I think there is a System.line_ending final or File.line_ending final
 or something.  Use "that" and we're in good shape.  But, I have a sneaking
suspicion that there is one of these platform things not available and
that might be the one that is missing.

-- 
iang