aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-09-30 18:19:38 +0000
committerdrh <>2024-09-30 18:19:38 +0000
commitcacef23082b8c60a7c211821a1d679bd25348a1e (patch)
tree787c52b6b62ca4a2bf5ebbbcb10f52c7d4c35f4e /src
parentd5838eaa42c103649fde3ee1806ff03f7ddece9d (diff)
downloadsqlite-cacef23082b8c60a7c211821a1d679bd25348a1e.tar.gz
sqlite-cacef23082b8c60a7c211821a1d679bd25348a1e.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index d1fc6aa74..35b9b089f 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 */