my strategy on implementing line-endings (eol) support

Mark Hammond mhammond at skippinet.com.au
Thu Apr 3 07:38:25 BST 2008


I wrote:

> That sounds good.  So getting back to the initial point:
> 
> > 3) text files with native/LF/CRLF/CR line-endings
> > 4) unicode text files similar to 3.
> 
> I'm suggesting that it would be less error prone to treat a missing
> encoding as meaning "ascii", and if you do, 3 and 4 become effectively
> identical.

To be clear - there are certainly optimizations which could be applied to the implementation to operate at the byte level - but these are also available for certain non-ascii encodings, and in all cases, we should still ensure that the bytes we are processing are valid in the encoding we think we are dealing with.  But these optimizations should be completely invisible to the user...

Mark 




More information about the bazaar mailing list