Ready for merge, but could use testing on some dusty old Windows machines.

FossilOrigin-Name: 20220615621e01ff83fd26133840e2553a6087bcb56bbb8e9bf1408dd881cd9b
This commit is contained in:
larrybr 2023-10-26 15:12:41 +00:00
parent 634b037fa3
commit 69d40f8e1f
3 changed files with 21 additions and 16 deletions

View File

@ -1,5 +1,5 @@
C Cure\sa\sharmless\sMSVC\swarning.\s(no\sother\schanges)
D 2023-10-25T20:44:01.155
C Ready\sfor\smerge,\sbut\scould\suse\stesting\son\ssome\sdusty\sold\sWindows\smachines.
D 2023-10-26T15:12:41.667
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -722,7 +722,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c 31229276a8eb5b5de1428cd2d80f6f1cf8ffc5248be25e47cf575df12f1b8f23
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 64c9bc7494f3d220a27498137551762c25458282388ea9ac0a710dd6d5dc1510
F src/shell.c.in 6b7662064d78025f0c68567971fe834840da8683972ac1ac7a02d6fbc9c166ef
F src/shell.c.in 14d70da4c678b2d9d8df105e113669ca956fad1d8538976e33fc8f878c17e84d
F src/sqlite.h.in 81c70644aeef9c974f72c9cadeb505ebb9441d2f6db594c018604ae935a12e6e
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 2f30b2671f4c03cd27a43f039e11251391066c97d11385f5f963bb40b03038ac
@ -2138,8 +2138,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 47b13e66e07be3a26cf7fa0b7b65ad8576c3b4be50fc422be8fe93be93d681ac
R b74c842dae72512c83feef833a3df3e2
P 02234ef85ed9349ddf6225f67b7e941b0b68cbd2e58c9d7d84a8324393349853
R 89654e88f6715a69f16578b67cbc1c07
U larrybr
Z 0170b741738e0aeb080b89c815bde8d0
Z 1dcda7e82518a66f972beec27c9600f6
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
02234ef85ed9349ddf6225f67b7e941b0b68cbd2e58c9d7d84a8324393349853
20220615621e01ff83fd26133840e2553a6087bcb56bbb8e9bf1408dd881cd9b

View File

@ -624,13 +624,13 @@ static void console_prepare_utf8(void){
HANDLE hCO = GetStdHandle(STD_OUTPUT_HANDLE);
HANDLE hCC = INVALID_HANDLE_VALUE;
DWORD consoleMode = 0;
u8 conIO = 0;
u8 conI = 0, conO = 0;
console_utf8_in = console_utf8_out = 0;
if( isatty(0) && GetFileType(hCI)==FILE_TYPE_CHAR ) conIO = 1;
if( isatty(1) && GetFileType(hCO)==FILE_TYPE_CHAR ) conIO |= 2;
if( conIO==0 || mbcs_opted ) return;
if( conIO & 1 ) hCC = hCI;
if( isatty(0) && GetFileType(hCI)==FILE_TYPE_CHAR ) conI = 1;
if( isatty(1) && GetFileType(hCO)==FILE_TYPE_CHAR ) conO = 1;
if( (!conI && !conO) || mbcs_opted ) return;
if( conI ) hCC = hCI;
else hCC = hCO;
if( !IsValidCodePage(CP_UTF8) || !GetConsoleMode( hCC, &consoleMode) ){
fprintf(stderr, "Cannot use UTF-8 code page.\n");
@ -640,14 +640,14 @@ static void console_prepare_utf8(void){
conState.consoleMode = consoleMode;
conState.inCodePage = GetConsoleCP();
conState.outCodePage = GetConsoleOutputCP();
if( conIO & 1 ){
if( conI ){
console_utf8_in = 1;
SetConsoleCP(CP_UTF8);
consoleMode |= ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT;
SetConsoleMode(conState.hConsole, consoleMode);
conState.infsMode = _setmode(_fileno(stdin), _O_U16TEXT);
}
if( conIO & 2 ){
if( conO ){
console_utf8_out = 1;
SetConsoleOutputCP(CP_UTF8);
}
@ -657,7 +657,7 @@ static void console_prepare_utf8(void){
** Undo the effects of console_prepare_utf8(), if any.
*/
static void SQLITE_CDECL console_restore(void){
if( (console_utf8_in||console_utf8_out) && conState.inCodePage!=0
if( (console_utf8_in||console_utf8_out)
&& conState.hConsole!=INVALID_HANDLE_VALUE ){
_setmode(_fileno(stdin), conState.infsMode);
SetConsoleCP(conState.inCodePage);
@ -12653,7 +12653,12 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
const char *zCharset = "";
int nHistory;
#if SHELL_WIN_UTF8_OPT
if( console_utf8_in ) zCharset = " (utf8)";
switch( console_utf8_in+2*console_utf8_out ){
default: case 0: break;
case 1: zCharset = " (utf8 in)"; break;
case 2: zCharset = " (utf8 out)"; break;
case 3: zCharset = " (utf8 I/O)"; break;
}
#endif
printf(
"SQLite version %s %.19s%s\n" /*extra-version-info*/