mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-24 14:17:58 +03:00
Improve the ".mode json" output of the CLI so that it encodes U+007f using
an escape sequence. FossilOrigin-Name: 8b58cf9bbd3090c60f1ee7468cdeeb0b0fa4560d1e51a5fd0bef43692d10fe04
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
||||
C Have\sthe\sxBestIndex\smethod\sof\sthe\sgenerate_series\svirtual\stable\signore\scontraints\son\sthe\s"value"\scolumn\swith\susable=0.
|
||||
D 2024-11-05T18:25:32.313
|
||||
C Improve\sthe\s".mode\sjson"\soutput\sof\sthe\sCLI\sso\sthat\sit\sencodes\sU+007f\susing\nan\sescape\ssequence.
|
||||
D 2024-11-05T23:26:31.239
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md c5b4009dca54d127d2d6033c22fd9cc34f53bedb6ef12c7cbaa468381c74ab28
|
||||
@@ -778,7 +778,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
|
||||
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
|
||||
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
|
||||
F src/select.c 4b14337a2742f0c0beeba490e9a05507e9b4b12184b9cd12773501d08d48e3fe
|
||||
F src/shell.c.in 4eb010971da0a4b103af5853152e9c95b991174df75528fda6f333037f0007a0
|
||||
F src/shell.c.in bb8ca98e903ea1dc60cee7e0a82017879662a2e4ce1f43889da87e8d4d774a5d
|
||||
F src/sqlite.h.in 599203aa6cf3a662f879e7581f4b7f2678738c0b7c71ddda3c0cb5c59867c399
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
|
||||
@@ -2199,8 +2199,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
|
||||
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
|
||||
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P 6adfca7e85648584740c8a127b95bd46aaad45fa2d162bd44622bb47debbcbcb
|
||||
R fb38b73bd5bdc524c9d9ddb12da6fa10
|
||||
U dan
|
||||
Z af4d59a9b5ba76359d3ebd50499f4172
|
||||
P f5113a2ef84831ad2da723fa7e29e0d575e74e10585741ff51db8c2e37332cd2
|
||||
R bbfc36e2090df7d25792a8d2c806a189
|
||||
U drh
|
||||
Z cf46ecae3bdcb7001fed6ddb7dbd656a
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
@@ -1 +1 @@
|
||||
f5113a2ef84831ad2da723fa7e29e0d575e74e10585741ff51db8c2e37332cd2
|
||||
8b58cf9bbd3090c60f1ee7468cdeeb0b0fa4560d1e51a5fd0bef43692d10fe04
|
||||
|
||||
@@ -2037,8 +2037,8 @@ const char *zSkipValidUtf8(const char *z, int nAccept, long ccm){
|
||||
const char *pcLimit = (nAccept>=0)? z+nAccept : 0;
|
||||
assert(z!=0);
|
||||
while( (pcLimit)? (z<pcLimit) : (ng-- != 0) ){
|
||||
char c = *z;
|
||||
if( (c & 0x80) == 0 ){
|
||||
unsigned char c = *(u8*)z;
|
||||
if( c<0x7f ){
|
||||
if( ccm != 0L && c < 0x20 && ((1L<<c) & ccm) != 0 ) return z;
|
||||
++z; /* ASCII */
|
||||
}else if( (c & 0xC0) != 0xC0 ) return z; /* not a lead byte */
|
||||
@@ -2106,7 +2106,7 @@ static void output_c_string(FILE *out, const char *z){
|
||||
}
|
||||
|
||||
/*
|
||||
** Output the given string as a quoted according to JSON quoting rules.
|
||||
** Output the given string as quoted according to JSON quoting rules.
|
||||
*/
|
||||
static void output_json_string(FILE *out, const char *z, i64 n){
|
||||
char c;
|
||||
@@ -2144,8 +2144,8 @@ static void output_json_string(FILE *out, const char *z, i64 n){
|
||||
if( cbsSay ){
|
||||
ace[1] = cbsSay;
|
||||
sqlite3_fputs(ace, out);
|
||||
}else if( c<=0x1f ){
|
||||
sqlite3_fprintf(out, "u%04x", c);
|
||||
}else if( c<=0x1f || c==0x7f ){
|
||||
sqlite3_fprintf(out, "\\u%04x", c);
|
||||
}else{
|
||||
ace[1] = (char)c;
|
||||
sqlite3_fputs(ace+1, out);
|
||||
|
||||
Reference in New Issue
Block a user