CLI: Take extra care to not split a multi-byte unicode character when doing

wordwrap.

FossilOrigin-Name: 00b1b7020a564976da3237532434e47ccf17eb5d620e6ac45f3e70b5d5739200
This commit is contained in:
drh 2022-02-01 13:17:11 +00:00
parent ca1776b5f3
commit e66532a63b
3 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C CLI:\sAdd\sthe\s--ww\soption\sas\san\salias\sfor\s--wordwrap.\s\sImprove\sthe\swordwrap\nalgorithm\sso\sthat\sit\sbreaks\sat\spunctuation\sif\sit\scannot\sfind\sspace.\s\sAlways\nwordwrap\swith\s--ww\seven\sif\sthere\sis\sa\s.width\ssetting\sfor\sthe\scolumn.
D 2022-02-01T12:28:17.432
C CLI:\sTake\sextra\scare\sto\snot\ssplit\sa\smulti-byte\sunicode\scharacter\swhen\sdoing\nwordwrap.
D 2022-02-01T13:17:11.049
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -553,7 +553,7 @@ F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
F src/resolve.c 24032ae57aec10df2f3fa2e20be0aae7d256bc704124b76c52d763440c7c0fe9
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c a6d2d4bed279d7fe4fcedaf297eaf6441e8e17c6e3947a32d24d23be52ac02f2
F src/shell.c.in b701feb3867d8293aafbb7164d3fd09f76c07a99184bfcac719351976b19e0ef
F src/shell.c.in 2f58e6aa6b3d2012db32f1c5fa4591e9d12fd582904632b4fc8f57a382b98fd3
F src/sqlite.h.in eaade58049152dac850d57415bcced885ca27ae9582f8aea2cfb7f1db78a521b
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 5d54cf13d3406d8eb65d921a0d3c349de6126b732e695e79ecd4830ce86b4f8a
@ -1942,8 +1942,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 10dbc278708cd2cce7fef90738082dbe31750d93e44b5fa5413a9a32dae7703a
R 69e29afaa5f754bae2ca14b8682cbcc3
P 1b528e31f8c62797e0814568b520c0680ff23a2ee877ca6aa70a167d40ebdf80
R fe91994efd36a88115500529351b7e2e
U drh
Z 4e6f65c63d4836409df930e76a99a677
Z 4d3a3178c78a3baab7f87b0b2d56c876
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
1b528e31f8c62797e0814568b520c0680ff23a2ee877ca6aa70a167d40ebdf80
00b1b7020a564976da3237532434e47ccf17eb5d620e6ac45f3e70b5d5739200

View File

@ -3227,7 +3227,7 @@ static char *translateForDisplayAndDup(
}
if( k<=i/2 ){
for(k=i; k>i/2; k--){
if( isalnum(z[k-1])!=isalnum(z[k]) ) break;
if( isalnum(z[k-1])!=isalnum(z[k]) && (z[k]&0xc0)!=0x80 ) break;
}
}
if( k<=i/2 ){