Wapp

Check-in [4b187296d9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improved JSON string literal encoding.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4b187296d9726d655c536052a8c741fe22f89a03cb45f9c3a242dfb6a7a8eaf3
User & Date: drh 2019-04-10 15:22:00
Context
2019-04-15
19:00
Update the built-in SQLite to the 3.28.0 beta. check-in: 482776f0ef user: drh tags: trunk
2019-04-10
15:22
Improved JSON string literal encoding. check-in: 4b187296d9 user: drh tags: trunk
2019-04-09
13:11
Update the built-in SQLite to the latest 3.28.0 alpha. check-in: 58675822f3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to wapp.tcl.

   151    151     }
   152    152     if {[regsub -all {[{}]} $s {[wappInt-%HHchar \\&]} s]} {
   153    153       set s [subst -novar -noback $s]
   154    154     }
   155    155     return $s
   156    156   }
   157    157   proc wappInt-enc-string {s} {
   158         -  return [string map {\\ \\\\ \" \\\" ' \\' < \\u003c \n \\n \r \\r} $s]
          158  +  return [string map {\\ \\\\ \" \\\" ' \\' < \\u003c \n \\n \r \\r
          159  +  	     \f \\f \t \\t \x01 \\u0001 \x02 \\u0002 \x03 \\u0003
          160  +  	     \x04 \\u0004 \x05 \\u0005 \x06 \\u0006 \x07 \\u0007
          161  +  	     \x0b \\u000b \x0e \\u000e \x0f \\u000f \x10 \\u0010
          162  +  	     \x11 \\u0011 \x12 \\u0012 \x13 \\u0013 \x14 \\u0014
          163  +  	     \x15 \\u0015 \x16 \\u0016 \x17 \\u0017 \x18 \\u0018
          164  +  	     \x19 \\u0019 \x1a \\u001a \x1b \\u001b \x1c \\u001c
          165  +  	     \x1d \\u001d \x1e \\u001e \x1f \\u001f} $s]
   159    166   }
   160    167   
   161    168   # This is a helper routine for wappInt-enc-url and wappInt-enc-qp.  It returns
   162    169   # an appropriate %HH encoding for the single character c.  If c is a unicode
   163    170   # character, then this routine might return multiple bytes:  %HH%HH%HH
   164    171   #
   165    172   proc wappInt-%HHchar {c} {