[sqlite] Summit a bug : data encoded from UTF8 is incorrect

2006-09-20 Thread
Hi all
   I use a tool name as sqlitebrowser which from 
sourceforge to browsed my db , BTW all data  be decoded as utf-8 (lanugage is 
chinese), the result of retrive is correct display, so I am sure that all data 
has no any problem when be inserted into db. right?
  for example, record be stored as utf8 in db as follow:
[-28, -72, -83] "中"
[-27, -92, -82] "央"
[-25, -108, -75] "电"
[-24, -89, -122] "视"
[-27, -113, -80] "台"
[-32, -126, -73] "・"
...(omit other characters)
, when call a function like follow:
const char* function(..)
{
 ...
 return (const char*)sqlite3_column_text(mpVM, nField);
 ...
}
the return value of result like this:

[-28, -72, -83] "中"
[-27, -92, -82] "央"
[-25, -108, -75] "电"
[-24, -89, -122] "视"
[-27, -113, -80] "台"
[-62, -73, -27] "・" NOTE:value be changed
so I think this is bug

[sqlite] utf8 decode

2006-09-20 Thread
Hi guys
   First of all, all data be complied as UTF-8 stored in my DB.
   Second, When   I used sqlite browser tool (from sourceforge)to browsed my 
DB, the result of chinese characters are correct, then I write a function which 
just call sqlite3_column_text inside it, Demo like below:
const char* demo(..)
{
 ...
return (const char*)sqlite3_column_text(mpVM, nField);
 ...
}
BTW, all something on the same DB and same recorde. I found that the same 
result of chinese characters are incorrect,