OLD | NEW |
1 /* | 1 /* |
2 ** 2004 April 13 | 2 ** 2004 April 13 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 19 matching lines...) Expand all Loading... |
30 ** | 30 ** |
31 ** BOM or Byte Order Mark: | 31 ** BOM or Byte Order Mark: |
32 ** 0xff 0xfe little-endian utf-16 follows | 32 ** 0xff 0xfe little-endian utf-16 follows |
33 ** 0xfe 0xff big-endian utf-16 follows | 33 ** 0xfe 0xff big-endian utf-16 follows |
34 ** | 34 ** |
35 */ | 35 */ |
36 #include "sqliteInt.h" | 36 #include "sqliteInt.h" |
37 #include <assert.h> | 37 #include <assert.h> |
38 #include "vdbeInt.h" | 38 #include "vdbeInt.h" |
39 | 39 |
40 #ifndef SQLITE_AMALGAMATION | 40 #if !defined(SQLITE_AMALGAMATION) && SQLITE_BYTEORDER==0 |
41 /* | 41 /* |
42 ** The following constant value is used by the SQLITE_BIGENDIAN and | 42 ** The following constant value is used by the SQLITE_BIGENDIAN and |
43 ** SQLITE_LITTLEENDIAN macros. | 43 ** SQLITE_LITTLEENDIAN macros. |
44 */ | 44 */ |
45 const int sqlite3one = 1; | 45 const int sqlite3one = 1; |
46 #endif /* SQLITE_AMALGAMATION */ | 46 #endif /* SQLITE_AMALGAMATION && SQLITE_BYTEORDER==0 */ |
47 | 47 |
48 /* | 48 /* |
49 ** This lookup table is used to help decode the first byte of | 49 ** This lookup table is used to help decode the first byte of |
50 ** a multi-byte UTF8 character. | 50 ** a multi-byte UTF8 character. |
51 */ | 51 */ |
52 static const unsigned char sqlite3Utf8Trans1[] = { | 52 static const unsigned char sqlite3Utf8Trans1[] = { |
53 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, | 53 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
54 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, | 54 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
55 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, | 55 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
56 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, | 56 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 assert( n>0 && n<=4 ); | 521 assert( n>0 && n<=4 ); |
522 z[0] = 0; | 522 z[0] = 0; |
523 z = zBuf; | 523 z = zBuf; |
524 READ_UTF16BE(z, 1, c); | 524 READ_UTF16BE(z, 1, c); |
525 assert( c==i ); | 525 assert( c==i ); |
526 assert( (z-zBuf)==n ); | 526 assert( (z-zBuf)==n ); |
527 } | 527 } |
528 } | 528 } |
529 #endif /* SQLITE_TEST */ | 529 #endif /* SQLITE_TEST */ |
530 #endif /* SQLITE_OMIT_UTF16 */ | 530 #endif /* SQLITE_OMIT_UTF16 */ |
OLD | NEW |