On Wed, 2007-02-28 at 13:13 +0100, Pavan wrote: > Hi Lucas, > > >Shouldn't it be "sqlite3_open16(L"test.db",&db)" ? > > I tried this call. It works. But, the db file is created only with the first > character name > and the extenstion is also missing. (its like 't') > > Also, can you point to me at some documentation which explains what does > the 'L' mean in the API ?
It means "string literal", and is used for building an array of wchar_t elements (instead of regular 8-bit char). The thing is, C doesn't say how big wchar_t is supposed to be. Some compilers make it 32-bit (yours could be one of these), and others make it 16-bit. There is, AFAIK, no portable way to declare UTF-16 string constants using C. Please inform me if I'm wrong about that, it's something I'd like to know how to do :) But I'm thinking you really want to do this anyway: sqlite3_open("test.db", &db); sqlite3_exec(db, "PRAGMA encoding = UTF-16", 0, 0, 0); sqlite3_open16() just converts the argument back to UTF-8 and does exactly the above anyway. Dan. > Thanks, > Pavan. > > > On 2/28/07, Nuno Lucas <[EMAIL PROTECTED]> wrote: > > > > On 2/28/07, Pavan <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > When i tried to create the db file using API sqlite3_open16("test.db > > ",&db) > > > it creats the file name with some junk > > > characters. > > > > Shouldn't it be "sqlite3_open16(L"test.db",&db)" ? > > > > Regards, > > ~Nuno Lucas > > > > > The file name is correct if i use sqlite3_open("test.db",&db). Does it > > mean > > > sqlite3 does not support > > > UTF16 encoding ? > > > or > > > Am i missing some package ? > > > > > > Thanks, > > > Pavan. > > > > > > ----------------------------------------------------------------------------- > > To unsubscribe, send email to [EMAIL PROTECTED] > > > > ----------------------------------------------------------------------------- > > > > > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------