On Wed, Feb 24, 2010 at 12:32:59PM +0100, Daniel Näslund wrote:
> Trying to understand the problem
> ----------------------------------
> A translated stream expects that the stuff to be written will have
> consistent line endings. It checks for consistent line endings by
> comparing the eol with the first eol written to the stream. If the first
> thing written is from the target, we will compare all subsequent eols
> with the targets eol.

Hmmm... is your understanding of the translation APIs correct?

The way I think it works is that you wrap a stream inside a translation
stream. At the point where you do the wrapping, you tell the translation
stream whether it should repair EOLs, and also what kind of EOL you'd
like the translated result to have.

Then, *if* you told the stream to repair newlines, the EOL-style you
specified at wrapping time is written to the output stream no matter
what EOL-style appears on the input stream.
Else, the stream is written unchanged.

Stefan

Reply via email to