1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Have the vdbe handle strings in the same encoding as the database. (CVS 1445)

FossilOrigin-Name: b7155db2b13aa3ca5f6c68e948d9e8740ebcac47
This commit is contained in:
danielk1977
2004-05-24 07:04:25 +00:00
parent 93d4675d67
commit 8a6b5411b3
9 changed files with 682 additions and 490 deletions

View File

@@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.97 2004/05/22 09:21:21 danielk1977 Exp $
** $Id: shell.c,v 1.98 2004/05/24 07:04:26 danielk1977 Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -80,7 +80,7 @@ static char continuePrompt[20]; /* Continuation prompt. default: " ...> " */
/*
** Determines if a string is a number of not.
*/
extern int sqlite3IsNumber(const char*, int*);
extern int sqlite3IsNumber(const char*, int*, unsigned char);
/*
** This routine reads a line of text from standard input, stores
@@ -392,7 +392,7 @@ static int callback(void *pArg, int nArg, char **azArg, char **azCol){
char *zSep = i>0 ? ",": "";
if( azArg[i]==0 ){
fprintf(p->out,"%sNULL",zSep);
}else if( sqlite3IsNumber(azArg[i], 0) ){
}else if( sqlite3IsNumber(azArg[i], 0, 1) ){
fprintf(p->out,"%s%s",zSep, azArg[i]);
}else{
if( zSep[0] ) fprintf(p->out,"%s",zSep);