From: drh <> Date: Mon, 30 Sep 2024 18:19:38 +0000 (+0000) Subject: Fix the character width tables for the CLI such that all unicode code-points X-Git-Tag: version-3.47.0~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cacef23082b8c60a7c211821a1d679bd25348a1e;p=thirdparty%2Fsqlite.git Fix the character width tables for the CLI such that all unicode code-points less than 0x300 have a width of 1. This is in fact the case for Mac, Ubuntu, and Windows. FossilOrigin-Name: f0c5a86fefecded07e098e1326dd54c72504b0bb480f710e395d4041a322dfcb --- diff --git a/manifest b/manifest index 77ea93c261..cd4363196a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sfts5,\savoid\sstarting\sa\snew\smerge\sof\slevel\sL\sif\sthere\sexists\salready\san\songoing\smerge\sof\sa\slevel\sless\sthan\sL. -D 2024-09-30T17:28:45.511 +C Fix\sthe\scharacter\swidth\stables\sfor\sthe\sCLI\ssuch\sthat\sall\sunicode\scode-points\nless\sthan\s0x300\shave\sa\swidth\sof\s1.\s\sThis\sis\sin\sfact\sthe\scase\sfor\sMac,\sUbuntu,\nand\sWindows. +D 2024-09-30T18:19:38.492 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -768,7 +768,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c 9750a281f7ba073b4e6da2be1a6c4071f5d841a7746c5fb3f70d6d793b6675ea F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 4b14337a2742f0c0beeba490e9a05507e9b4b12184b9cd12773501d08d48e3fe -F src/shell.c.in 345173187067363374187176a8bbe779e359849e635d8288202000ee87f4405a +F src/shell.c.in d71d2463459e6cd9c2f2d702545aed5113ffbcea963c19c1e6d3a6d762ef959c F src/sqlite.h.in b20547021d20ba016c2fd0500f14f08a21ff23e64a0ed93e72ca0fecb9e1d0a0 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54 @@ -2213,8 +2213,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 76b6331e6a705a420a64820a18214f07cf4c1d5151e7158d6fff09964e63f352 -R af602edd5730d15273eb424f12f293da -U dan -Z 7c2ca47bd5a0ad794a2bc7691bf0167e +P 350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a +R 196058ccce20b5d040ef28c3115701ff +U drh +Z c9a58ad028df05647dcb5802e9848199 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 35fff3b926..4742ec1d1d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a +f0c5a86fefecded07e098e1326dd54c72504b0bb480f710e395d4041a322dfcb diff --git a/src/shell.c.in b/src/shell.c.in index d1fc6aa748..35b9b089fa 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -631,7 +631,7 @@ static const struct { unsigned char w; /* Width of the character in columns */ int iFirst; /* First character in a span having this width */ } aUWidth[] = { - /* {0, 0x00000}, {1, 0x00020}, {0, 0x0007f}, {1, 0x000a0}, */ + /* {1, 0x00000}, */ {0, 0x00300}, {1, 0x00370}, {0, 0x00483}, {1, 0x00487}, {0, 0x00488}, {1, 0x0048a}, {0, 0x00591}, {1, 0x005be}, {0, 0x005bf}, {1, 0x005c0}, {0, 0x005c1}, {1, 0x005c3}, {0, 0x005c4}, {1, 0x005c6}, {0, 0x005c7}, @@ -709,9 +709,6 @@ int cli_wcwidth(int c){ int iFirst, iLast; /* Fast path for common characters */ - if( c<0x20 ) return 0; - if( c<0x7f ) return 1; - if( c<0xa0 ) return 0; if( c<=0x300 ) return 1; /* The general case */