]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Make the -utf8 option the default behavior in the CLI on Windows for 64-bit
authordrh <>
Mon, 11 Sep 2023 20:02:38 +0000 (20:02 +0000)
committerdrh <>
Mon, 11 Sep 2023 20:02:38 +0000 (20:02 +0000)
builds.

FossilOrigin-Name: 8b3c306def81546c5987f0f245d2bf3960218254c2833e9c27cd242e9118db62

manifest
manifest.uuid
src/shell.c.in

index a4a0043e5c0e2c5cad07919baff4f973cd2bc31d..ae42d9a95fe1ce855b82943c20e330847f43575f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Refuse\sto\sbuild\samalgamation-tarball\sand\ssnapshot-tarball\sif\sthe\sTEA\sversion\nnumber\sdisagrees\swith\s./VERSION.
-D 2023-09-11T15:27:27.017
+C Make\sthe\s-utf8\soption\sthe\sdefault\sbehavior\sin\sthe\sCLI\son\sWindows\sfor\s64-bit\nbuilds.
+D 2023-09-11T20:02:38.411
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -709,7 +709,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c 37953a5f36c60bea413c3c04efcd433b6177009f508ef2ace0494728912fe2e9
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c e9fb48546ab1882639a3a960383f6342dddb776c0227615f8e19de51f0102f68
-F src/shell.c.in 2f9be25294b68b07e7e81f0adcec4475aba6011b64f160e414efe226910c4d7b
+F src/shell.c.in 965c53a121c9912c69a6f57614c89849f10089f5e13931caf01d0eab921da135
 F src/sqlite.h.in 931a58d119d5cf87110648f39fa0bb9f1738b0068cb68250d893304a471bd6c0
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 2f30b2671f4c03cd27a43f039e11251391066c97d11385f5f963bb40b03038ac
@@ -2119,8 +2119,11 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P e8e07dbbeaa7799eb0b90726e18e994aaf8c8d316ab4bdb06da732bc51cf0919
-R 47a023e43214e7beb88d9f0c2bdaeb52
+P 3308fdda4b81c110ba4a66d0b325e7653c2f8155e7864aeb78991ed1da061836
+R 749ff62c06f0f9de87d1bcc645a12c81
+T *branch * cli-utf8
+T *sym-cli-utf8 *
+T -sym-trunk *
 U drh
-Z e364c82fe8f0c3d644fc3a2a8b03ad53
+Z 09a2b4287b6e681a2e740721f0702888
 # Remove this line to create a well-formed Fossil manifest.
index 037b59321c972e518f19de237d7035f54dff7a23..59bff84a09a2148dc12970ff459412c5fbf7c587 100644 (file)
@@ -1 +1 @@
-3308fdda4b81c110ba4a66d0b325e7653c2f8155e7864aeb78991ed1da061836
\ No newline at end of file
+8b3c306def81546c5987f0f245d2bf3960218254c2833e9c27cd242e9118db62
\ No newline at end of file
index 07d92d0142e3a4f45212940e21897306e4aaa2f2..7dd3d85ceca711dfcd88b92144fb889ff29bb6d3 100644 (file)
@@ -452,15 +452,10 @@ static int stdin_is_interactive = 1;
 #if (defined(_WIN32) || defined(WIN32)) && SHELL_USE_LOCAL_GETLINE \
   && !defined(SHELL_OMIT_WIN_UTF8)
 # define SHELL_WIN_UTF8_OPT 1
+  static int console_utf8 = sizeof(char*)/4 - 1;
 #else
 # define SHELL_WIN_UTF8_OPT 0
-#endif
-
-#if SHELL_WIN_UTF8_OPT
-/*
-** Setup console for UTF-8 input/output when following variable true.
-*/
-static int console_utf8 = 0;
+  static const int console_utf8 = 0;
 #endif
 
 /*
@@ -734,11 +729,7 @@ static char* utf8_fgets(char *buf, int ncmax, FILE *fin){
 void utf8_printf(FILE *out, const char *zFormat, ...){
   va_list ap;
   va_start(ap, zFormat);
-  if( stdout_is_console && (out==stdout || out==stderr)
-# if SHELL_WIN_UTF8_OPT
-      && !console_utf8
-# endif
-  ){
+  if( stdout_is_console && (out==stdout || out==stderr) && !console_utf8 ){
     char *z1 = sqlite3_vmprintf(zFormat, ap);
     char *z2 = sqlite3_win32_utf8_to_mbcs_v2(z1, 0);
     sqlite3_free(z1);
@@ -952,11 +943,7 @@ static char *local_getline(char *zLine, FILE *in){
   /* For interactive input on Windows systems, without -utf8,
   ** translate the multi-byte characterset characters into UTF-8.
   ** This is the translation that predates the -utf8 option. */
-  if( stdin_is_interactive && in==stdin
-# if SHELL_WIN_UTF8_OPT
-      && !console_utf8
-# endif /* SHELL_WIN_UTF8_OPT */
-  ){
+  if( stdin_is_interactive && in==stdin && !console_utf8 ){
     char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
     if( zTrans ){
       i64 nTrans = strlen(zTrans)+1;