Home | History | Annotate | Download | only in dist

Lines Matching refs:ENC

9631   u8 enc;              /* Text encoding used by this database */
9824 #define ENC(db) ((db)->aDb[0].pSchema->enc)
10044 u8 enc; /* Text encoding handled by xCmp() */
10310 u8 enc; /* Text encoding - one of the SQLITE_UTF* values */
11873 SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
12988 u8 enc; /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */
20697 assert( pMem->enc!=desiredEnc );
20698 assert( pMem->enc!=0 );
20713 if( pMem->enc!=SQLITE_UTF8 && desiredEnc!=SQLITE_UTF8 ){
20729 pMem->enc = desiredEnc;
20765 if( pMem->enc==SQLITE_UTF8 ){
20786 if( pMem->enc==SQLITE_UTF16LE ){
20806 pMem->enc = desiredEnc;
20826 ** byte-swapping, it just sets Mem.enc appropriately.
20855 pMem->enc = bom;
20923 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
20927 sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC);
20942 ** enc. A pointer to the new string is returned, and the value of *pnOut
20951 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *db, u8 enc, char *z, int n, int *pnOut){
20956 if( sqlite3VdbeMemTranslate(&m, enc) ){
21290 ** uses the encoding enc. The string is not necessarily zero-terminated.
21307 SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
21309 int incr = (enc==SQLITE_UTF8?1:2);
21323 if( enc==SQLITE_UTF16BE ) z++;
21458 return !sqlite3Atoi64(z, pResult, length, enc);
21509 ** given by enc.
21511 SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){
21512 int incr = (enc==SQLITE_UTF8?1:2);
21519 if( enc==SQLITE_UTF16BE ) zNum++;
58421 if( !(pMem->flags&MEM_Str) || pMem->enc==desiredEnc ){
58434 assert(rc==SQLITE_OK || pMem->enc!=desiredEnc);
58435 assert(rc==SQLITE_NOMEM || pMem->enc==desiredEnc);
58580 SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, int enc){
58610 pMem->enc = SQLITE_UTF8;
58612 sqlite3VdbeChangeEncoding(pMem, enc);
58745 sqlite3Atoi64(pMem->z, &value, pMem->n, pMem->enc);
58768 sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);
58850 if( 0==sqlite3Atoi64(pMem->z, &pMem->u.i, pMem->n, pMem->enc) ){
58890 pMem->enc = SQLITE_UTF8;
59070 u8 enc, /* Encoding of z. 0 for BLOBs */
59091 flags = (enc==0?MEM_Blob:MEM_Str);
59093 assert( enc!=0 );
59094 if( enc==SQLITE_UTF8 ){
59109 nAlloc += (enc==SQLITE_UTF8?1:2);
59131 pMem->enc = (enc==0 ? SQLITE_UTF8 : enc);
59132 pMem->type = (enc==0 ? SQLITE_BLOB : SQLITE_TEXT);
59135 if( pMem->enc!=SQLITE_UTF8 && sqlite3VdbeMemHandleBom(pMem) ){
59219 assert( pMem1->enc==pMem2->enc );
59220 assert( pMem1->enc==SQLITE_UTF8 ||
59221 pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE );
59230 if( pMem1->enc==pColl->enc ){
59243 v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
59245 v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
59307 pMem->enc = 0;
59331 ** (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED.
59335 SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
59339 assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
59349 sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
59350 if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){
59359 sqlite3VdbeMemStringify(pVal, enc);
59362 assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
59364 if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){
59397 u8 enc, /* Encoding to use */
59451 if( enc!=SQLITE_UTF8 ){
59452 sqlite3VdbeChangeEncoding(pVal, enc);
59456 if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal) ){
59466 sqlite3ValueApplyAffinity(pVal, affinity, enc);
59508 u8 enc, /* Encoding to use */
59511 if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);
59525 ** that it uses the encoding "enc"
59527 SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
59529 if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){
60766 pMem->enc = SQLITE_UTF8;
60815 pMem->enc = SQLITE_UTF8;
60829 pMem->enc = SQLITE_UTF8;
60837 pMem->enc = SQLITE_UTF8;
62450 pMem->enc = pKeyInfo->enc;
62494 mem1.enc = pKeyInfo->enc;
62971 u8 enc, /* Encoding of z. 0 for BLOBs */
62974 if( sqlite3VdbeMemSetStr(&pCtx->s, z, n, enc, xDel)==SQLITE_TOOBIG ){
63825 rc = sqlite3VdbeChangeEncoding(pVar, ENC(p->db));
63923 pValue->enc);
64217 u8 enc = ENC(db);
64218 if( enc!=SQLITE_UTF8 ){
64222 sqlite3VdbeMemSetStr(&utf8, pVar->z, pVar->n, enc, SQLITE_STATIC);
64497 #define Stringify(P, enc) \
64498 if(((P)->flags&(MEM_Str|MEM_Blob))==0 && sqlite3VdbeMemStringify(P,enc)) \
64617 u8 enc = pRec->enc;
64619 if( sqlite3AtoF(pRec->z, &rValue, pRec->n, enc)==0 ) return;
64620 if( 0==sqlite3Atoi64(pRec->z, &iValue, pRec->n, enc) ){
64651 u8 enc /* Use this text encoding */
64659 sqlite3VdbeMemStringify(pRec, enc);
64694 u8 enc
64696 applyAffinity((Mem *)pVal, affinity, enc);
64740 sqlite3_snprintf(100, zCsr, "]%s", encnames[pMem->enc]);
64775 sqlite3_snprintf(100,&zBuf[k], encnames[pMem->enc]);
65007 u8 encoding = ENC(db); /* The database encoding */
65829 pOut->enc = encoding;
65867 pOut->enc = encoding;
66097 pOut->enc = encoding;
67292 u.an.pDest->enc = encoding;
67480 pOut->enc = SQLITE_UTF8; /* In case the blob is ever converted to text */
68064 u.ax.pKeyInfo->enc = ENC(p->db);
68156 u.ay.pCx->pKeyInfo->enc = ENC(p->db);
68183 u.az.pCx->pKeyInfo->enc = ENC(p->db);
69183 pOut->enc = SQLITE_UTF8; /* In case the blob is ever cast to text */
70547 pOut->enc = SQLITE_UTF8;
70928 testcase( u.cp.pName->enc==SQLITE_UTF8 );
70929 testcase( u.cp.pName->enc==SQLITE_UTF16BE );
70930 testcase( u.cp.pName->enc==SQLITE_UTF16LE );
73730 u8 enc = ENC(pParse->db); /* The database encoding */
73736 pDef = sqlite3FindFunction(pParse->db, zId, nId, n, enc, 0);
73738 pDef = sqlite3FindFunction(pParse->db, zId, nId, -1, enc, 0);
74537 pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
75936 && sqlite3FindCollSeq(db, ENC(db), pIdx->azColl[0], 0)==pReq
76982 u8 enc = ENC(db); /* The text encoding used by this database */
76997 pDef = sqlite3FindFunction(db, zId, nId, nFarg, enc, 0);
78327 u8 enc = ENC(pParse->db);
78337 pExpr->x.pList ? pExpr->x.pList->nExpr : 0, enc, 0);
80574 }else if( aNew->pSchema->file_format && aNew->pSchema->enc!=ENC(db) ){
82117 sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
82504 u8 enc = ENC(db);
82508 pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
82510 pColl = sqlite3GetCollSeq(db, enc, pColl, zName);
84981 pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
85069 ** in the encoding enc of name zName, length nName.
85071 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
85076 db->xCollNeeded(db->pCollNeededArg, db, enc, zExternal);
85086 db->xCollNeeded16(db->pCollNeededArg, db, (int)ENC(db), zExternal);
85132 u8 enc, /* The desired encoding for the collating sequence */
85140 p = sqlite3FindCollSeq(db, enc, zName, 0);
85146 callCollNeeded(db, enc, zName);
85147 p = sqlite3FindCollSeq(db, enc, zName, 0);
85171 CollSeq *p = sqlite3GetCollSeq(db, ENC(db), pColl, zName);
85211 pColl[0].enc = SQLITE_UTF8;
85213 pColl[1].enc = SQLITE_UTF16LE;
85215 pColl[2].enc = SQLITE_UTF16BE;
85238 ** for the encoding 'enc' from the database 'db'.
85252 u8 enc,
85263 assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
85264 if( pColl ) pColl += enc-1;
85271 ** that uses encoding enc. The value returned indicates how well the
85289 static int matchQuality(FuncDef *p, int nArg, u8 enc){
85298 if( enc==p->iPrefEnc ){
85301 else if( (enc==SQLITE_UTF16LE && p->iPrefEnc==SQLITE_UTF16BE) ||
85302 (enc==SQLITE_UTF16BE && p->iPrefEnc==SQLITE_UTF16LE) ){
85378 u8 enc, /* Preferred text encoding */
85387 assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
85394 int score = matchQuality(p, nArg, enc);
85419 int score = matchQuality(p, nArg, enc);
85436 pBest->iPrefEnc = enc;
85502 p->enc = SQLITE_UTF8;
93385 u8 enc;
93403 assert( encnames[SQLITE_UTF8].enc==SQLITE_UTF8 );
93404 assert( encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE );
93405 assert( encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE );
93406 sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
93409 /* Only change the value of sqlite.enc if the database handle is not
93410 ** initialized. If the main database exists, the new sqlite.enc value
93420 ENC(pParse->db) = pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE;
93927 ** main database, set sqlite3.enc to the encoding of the main database.
93929 ** as sqlite3.enc.
93934 /* If opening the main database, set ENC(db). */
93937 ENC(db) = encoding;
93940 /* If opening an attached database, the encoding much match ENC(db) */
93941 if( meta[BTREE_TEXT_ENCODING-1]!=ENC(db) ){
93951 pDb->pSchema->enc = ENC(db);
95307 pInfo->enc = ENC(db);
96415 pKeyInfo->enc = ENC(db);
96797 pKeyMerge->enc = ENC(db);
96837 pKeyDup->enc = ENC(db);
100541 u8 enc = ENC(sqlite3VdbeDb(v));
100545 sqlite3ValueFromExpr(sqlite3VdbeDb(v), pCol->pDflt, enc,
105099 assert( pColl->enc==SQLITE_UTF8 );
105107 z = (const u8 *)sqlite3ValueText(pVal, pColl->enc);
105113 n = sqlite3ValueBytes(pVal, pColl->enc);
105121 if( pColl->enc!=SQLITE_UTF8 ){
105124 db, pColl->enc, aSample[i].u.z, aSample[i].nByte, &nSample
113552 int enc,
113580 if( enc==SQLITE_UTF16 ){
113581 enc = SQLITE_UTF16NATIVE;
113582 }else if( enc==SQLITE_ANY ){
113593 enc = SQLITE_UTF16BE;
113596 enc = SQLITE_UTF8;
113604 p = sqlite3FindFunction(db, zFunctionName, nName, nArg, (u8)enc, 0);
113605 if( p && p->iPrefEnc==enc && p->nArg==nArg ){
113616 p = sqlite3FindFunction(db, zFunctionName, nName, nArg, (u8)enc, 1);
113646 int enc,
113652 return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xFunc, xStep,
113660 int enc,
113679 rc = sqlite3CreateFunc(db, zFunc, nArg, enc, p, xFunc, xStep, xFinal, pArg);
114142 ** and the encoding is enc.
114147 u8 enc,
114162 enc2 = enc;
114191 if( (pColl->enc & ~SQLITE_UTF16_ALIGNED)==enc2 ){
114196 if( p->enc==pColl->enc ){
114211 pColl->enc = (u8)(enc2 | (enc & SQLITE_UTF16_ALIGNED));
114855 ENC(*ppDb) = SQLITE_UTF16NATIVE;
114872 int enc,
114879 rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, 0);
114891 int enc,
114899 rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, xDel);
114912 int enc,
114922 rc = createCollation(db, zName8, (u8)enc, pCtx, xCompare, 0);
133900 int enc; /* Optimal text encoding */
133928 db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0