Fossil SCM

committed a function with a bad name because I C&P and foolishly didn't build or test; glad it was on a branch

sdr 2016-06-11 00:11 invalid_utf8_table
Commit 2e7a6cb03d053aad15defd49c76eab522ee07e4d
1 file changed +1 -1
+1 -1
--- src/lookslike.c
+++ src/lookslike.c
@@ -143,11 +143,11 @@
143143
** Java and Tcl use it. This function also considers valid
144144
** the derivatives CESU-8 & WTF-8 (as described in the same
145145
** wikipedia article referenced previously).
146146
*/
147147
148
-int invalid_utf8_b(const Blob *pContent)
148
+int invalid_utf8(const Blob *pContent)
149149
{
150150
/* definitions for various utf-8 sequence lengths */
151151
static unsigned char def_2a[] = { 2, 0xC0, 0xC0, 0x80, 0x80 };
152152
static unsigned char def_2b[] = { 2, 0xC2, 0xDF, 0x80, 0xBF };
153153
static unsigned char def_3a[] = { 3, 0xE0, 0xE0, 0xA0, 0xBF, 0x80, 0xBF };
154154
--- src/lookslike.c
+++ src/lookslike.c
@@ -143,11 +143,11 @@
143 ** Java and Tcl use it. This function also considers valid
144 ** the derivatives CESU-8 & WTF-8 (as described in the same
145 ** wikipedia article referenced previously).
146 */
147
148 int invalid_utf8_b(const Blob *pContent)
149 {
150 /* definitions for various utf-8 sequence lengths */
151 static unsigned char def_2a[] = { 2, 0xC0, 0xC0, 0x80, 0x80 };
152 static unsigned char def_2b[] = { 2, 0xC2, 0xDF, 0x80, 0xBF };
153 static unsigned char def_3a[] = { 3, 0xE0, 0xE0, 0xA0, 0xBF, 0x80, 0xBF };
154
--- src/lookslike.c
+++ src/lookslike.c
@@ -143,11 +143,11 @@
143 ** Java and Tcl use it. This function also considers valid
144 ** the derivatives CESU-8 & WTF-8 (as described in the same
145 ** wikipedia article referenced previously).
146 */
147
148 int invalid_utf8(const Blob *pContent)
149 {
150 /* definitions for various utf-8 sequence lengths */
151 static unsigned char def_2a[] = { 2, 0xC0, 0xC0, 0x80, 0x80 };
152 static unsigned char def_2b[] = { 2, 0xC2, 0xDF, 0x80, 0xBF };
153 static unsigned char def_3a[] = { 3, 0xE0, 0xE0, 0xA0, 0xBF, 0x80, 0xBF };
154

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button