-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/17/2015 12:20 PM, Graham Holden wrote:
> I would echo this: it's good at mangling the command-line, but
> I've not been aware of it ever mangling data sent to a file/stream
> (other than the binary/text mode conversions).

In text mode (the default for stdin/out on Windows) control Z (ascii
26) is also considered end of file.

Microsoft don't document everything that is done to text streams, but
there is likely to also be some conversions for the current code page
and MBCS.  Here for example is what is done with stdio when using the
wide character methods:

  http://msdn.microsoft.com/en-us/library/c4cy2b8e.aspx

The bug in the SQLite shell is that it tries to manage the encoding
itself, which is fine if the file is in binary mode.  But with
stdin/out in text mode doing so will lead to extra data mangling.  The
shell needs to change stdin/out to binary mode:

  http://msdn.microsoft.com/en-us/library/tw4k6df8.aspx

Roger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlS68dsACgkQmOOfHg372QSWRQCfeBr7J/p0VhqsDwRAhDcSDq3d
MuYAoLG9R5Z3DiEHQgYTY/Ulpu7ilgIi
=/lr/
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to