aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/sqlite3_stdio.c
diff options
context:
space:
mode:
authordrh <>2024-10-11 23:31:37 +0000
committerdrh <>2024-10-11 23:31:37 +0000
commit589ce93e9efc754334ef1f38c04bef9d0cbac891 (patch)
tree964c0e746e0dae2d2b338eaad309a95a4394aa65 /ext/misc/sqlite3_stdio.c
parent4859bc9a9ffdb9fa555a57db3593ccb08a0be983 (diff)
downloadsqlite-589ce93e9efc754334ef1f38c04bef9d0cbac891.tar.gz
sqlite-589ce93e9efc754334ef1f38c04bef9d0cbac891.zip
Additional clarification in the comments to sqlite3_stdio.c. No changes
to code. FossilOrigin-Name: 2db24c5364808008fa503f37ca8ccf5d135e8f6bfac2efb29e509e26f7190470
Diffstat (limited to 'ext/misc/sqlite3_stdio.c')
-rw-r--r--ext/misc/sqlite3_stdio.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/misc/sqlite3_stdio.c b/ext/misc/sqlite3_stdio.c
index 81fcfe23f..6c0f5afca 100644
--- a/ext/misc/sqlite3_stdio.c
+++ b/ext/misc/sqlite3_stdio.c
@@ -32,16 +32,20 @@
/*
** If the SQLITE_U8TEXT_ONLY option is defined, then use O_U8TEXT
-** when appropriate on all output.
+** when appropriate on all output. (Sometimes use O_BINARY when
+** rendering ASCII text in cases where NL-to-CRLF expansion would
+** not be correct.)
**
** If the SQLITE_U8TEXT_STDIO option is defined, then use O_U8TEXT
-** when appropriate when writing to stdout or stderr. Use O_BINARY for
-** anything else.
+** when appropriate when writing to stdout or stderr. Use O_BINARY
+** or O_TEXT (depending on things like the .mode and the .crnl setting
+** in the CLI, or other context clues in other applications) for all
+** other output channels.
**
** The default behavior, if neither of the above is defined is to
** use O_U8TEXT when writing to the Windows console (or anything
-** else for which _isatty() returns true) and to use O_BINARY for
-** all other output.
+** else for which _isatty() returns true) and to use O_BINARY or O_TEXT
+** for all other output channels.
*/
#if defined(SQLITE_U8TEXT_ONLY)
# define UseWtextForOutput(fd) 1