I guess the database is encoded in UTF-16 and you are reading the text
using sqlite3_column_blob instead of sqlite3_column_text.

F.

On Wed, Sep 7, 2011 at 5:15 PM, Daniel Spain <dspai...@msn.com> wrote:
>
>
>
>
> hello all i am creating a text mud gamibng engine and has been going great up 
> until recently.when a user is examining their current room all the text is 
> double spaced.i have tried this as both a blob and text field with a max 
> length of 4096. here is my funtion to display long room descriptions: GBOOL 
> EXPORTlook(VOID)/* examine current room */{       if(islit(chrptr->loc))      
>   {            prfmlt(LOKOTH,chrptr->name);             
> outloc(getloc(usrnum),usrnum,-1);            
> prfmlt(LOOKING,database_blob("Rooms",chrptr->loc,ROOMKEY_LONGDESC));          
>   outmlt(usrnum);       }       else       {           prfmlt(TOODRK);        
>    outmlt(usrnum);       }       return(TRUE);} here is the database_blob 
> function: CHAR * EXPORTdatabase_blob(const CHAR *table,const LONG 
> record,const LONG field)/* return blob field value from a table */{     const 
> CHAR *tail;     static CHAR ret[4096];      strcpy(ret,"NULL");      
> sprintf(vdatmp,"SELECT * FROM %s WHERE Record = %ld",table,record)
>  ;     
> if(sqlite3_prepare_v2(database,vdatmp,strlen(vdatmp),&statement,&tail)==SQLITE_OK)
>      {         while(sqlite3_step(statement) == SQLITE_ROW)         {         
>       strncpy(ret,sqlite3_column_blob(statement,field),4096);         }     } 
>      return(ret);}  it all works fine it just double spaces the returned 
> text.some of my beta testers stripped all the periods from the text and 
> saidit worked fine so i don't know if the periods are somehow sayingmove to 
> the next line or what. thanks.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to