-C Skip\stests\sthat\srequire\sUTF-16\ssupport\swhen\scompiled\swith\sSQLITE_OMIT_UTF16.
-D 2013-03-07T09:39:18.757
+C Fix\sthe\schar()\sfunction\sso\sthat\sit\sworks\seven\sif\sSQLITE_OMIT_UTF16\sis\sdefined.
+D 2013-03-07T14:00:04.830
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 9a804abbd3cae82d196e4d33aba13239e32522a5
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/expr.c a23b4aac2a455b2e76b55bef5dcfbe62b665375c
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
F src/fkey.c e16942bd5c8a868ac53287886464a5ed0e72b179
-F src/func.c f829e79fe7c7150659bee6d521b1edbda4a97dc3
+F src/func.c 48987c025d69399f59a1c2a553cea5da41bf105d
F src/global.c e59ecd2c553ad0d4bfbc84ca71231336f8993a7a
F src/hash.c ac3470bbf1ca4ae4e306a8ecb0fdf1731810ffe4
F src/hash.h 2894c932d84d9f892d4b4023a75e501f83050970
F test/fts4merge3.test aab02a09f50fe6baaddc2e159c3eabc116d45fc7
F test/fts4unicode.test 25ccad45896f8e50f6a694cff738a35f798cdb40
F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
-F test/func.test 2d243cc61d11f1a8b984bdf5ac8a44683836b5dd
+F test/func.test b058483c17952eff7797b837bbb61e27e6b05606
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
F test/func3.test 001021e5b88bd02a3b365a5c5fd8f6f49d39744a
F test/fuzz-oss1.test 4912e528ec9cf2f42134456933659d371c9e0d74
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 10ace06be7fbe9a76a201c418b2af453c7a69043
-R 4a6c0696fed39506ac10ad23e245be27
-U mistachkin
-Z 2203d346668b3376e187a4b6cb595762
+P e39391422e748407d74853d3de297dc1ea6b991d
+R 822f408c1766b55e00934d75132877ff
+U drh
+Z 4bfedc097a3e5f9aa5da630099d07ac8
** an integer. It constructs a string where each character of the string
** is the unicode character for the corresponding integer argument.
*/
-#ifndef SQLITE_OMIT_UTF16
static void charFunc(
sqlite3_context *context,
int argc,
x = sqlite3_value_int64(argv[i]);
if( x<0 || x>0x10ffff ) x = 0xfffd;
c = (unsigned)(x & 0x1fffff);
- if( c<=0xFFFF ){
- if( c>=0xd800 && c<=0xdfff ) c = 0xfffd;
- *zOut++ = (u8)(c&0x00FF);
- *zOut++ = (u8)((c>>8)&0x00FF);
+ if( c<0x00080 ){
+ *zOut++ = (u8)(c&0xFF);
+ }else if( c<0x00800 ){
+ *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);
+ *zOut++ = 0x80 + (u8)(c & 0x3F);
+ }else if( c<0x10000 ){
+ *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);
+ *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);
+ *zOut++ = 0x80 + (u8)(c & 0x3F);
}else{
- *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));
- *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));
- *zOut++ = (u8)(c&0x00FF);
- *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));
- }
+ *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);
+ *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);
+ *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);
+ *zOut++ = 0x80 + (u8)(c & 0x3F);
+ } \
}
- sqlite3_result_text16le(context, (char*)z, (int)(zOut-z), sqlite3_free);
+ sqlite3_result_text(context, (char*)z, (int)(zOut-z), sqlite3_free);
}
-#endif
/*
** The hex() function. Interpret the argument as a blob. Return
FUNCTION(substr, 2, 0, 0, substrFunc ),
FUNCTION(substr, 3, 0, 0, substrFunc ),
FUNCTION(unicode, 1, 0, 0, unicodeFunc ),
-#ifndef SQLITE_OMIT_UTF16
FUNCTION(char, -1, 0, 0, charFunc ),
-#endif
FUNCTION(abs, 1, 0, 0, absFunc ),
#ifndef SQLITE_OMIT_FLOATING_POINT
FUNCTION(round, 1, 0, 0, roundFunc ),