aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-09-25 12:56:44 +0000
committerdrh <>2024-09-25 12:56:44 +0000
commit9e59c06fb1644fed1499b65cbe547b1eb07bc6ea (patch)
tree2bd4ca417d791058ee849f4382f1c9ba449de1ef /src
parent853520ddbf85b29db418cc283648e4eac0f62a83 (diff)
downloadsqlite-9e59c06fb1644fed1499b65cbe547b1eb07bc6ea.tar.gz
sqlite-9e59c06fb1644fed1499b65cbe547b1eb07bc6ea.zip
Always include a UTF-8 BOM at the beginning of the output CSV when using
the ".excel" command on Windows, as the actual Excel program requires the BOM in order to work correctly. FossilOrigin-Name: 04727fc00207325a76a5d5f20549c00232810ac727dedb70bc9e8112e60b3f56
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index 6dba6e8c3..c6beeee0d 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -9941,6 +9941,10 @@ static int do_meta_command(char *zLine, ShellState *p){
p->mode = MODE_Csv;
sqlite3_snprintf(sizeof(p->colSeparator), p->colSeparator, SEP_Comma);
sqlite3_snprintf(sizeof(p->rowSeparator), p->rowSeparator, SEP_CrLf);
+#ifdef _WIN32
+ zBom = zBomUtf8; /* Always include the BOM on Windows, as Excel does
+ ** not work without it. */
+#endif
}else{
/* text editor mode */
newTempFile(p, "txt");