sqlite3_open16 with unicode string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite3_open16 with unicode string

Benoit Gantaume

Hi all,
I have a little problem when trying to open database that contain Unicode caracters:
Here is a small sample:


wstring lPath = L"c:\\\x4ECA\x6708 database.db";
DWORD lReturn = sqlite3_open16((void *)lPath.c_str (), &this->cdb);

This works correctly, but the problem is that the database name created is not correct:
I get something like: [今月 database.db] instead of [今月database.db]
I guess that I have a problem a string encoding, but I can not find any solution.

I have also tried to use sqlite3_open with encoding the name UTF8, but I get exactly the same result.

Can anyone help?
Thanks a lot
       
Benoît Gantaume
R&D Manager.
DMAILER


Reply | Threaded
Open this post in threaded view
|

RE: sqlite3_open16 with unicode string

Benoit Gantaume

Hi all,
I just wanted to let you know that when updating the sources, the problem wad solved!

++


Benoît Gantaume
R&D Manager.
DMAILER
15 av. Frederic Mistral
13008 Marseille, France
Bureau:
+33 4 91 29 32 80
Fax :
+33 4 91 76 39 27
Email :
[hidden email]
Web:
http://www.dmailer.com

 
 
 
 
 

 

-----Original Message-----
From: Benoit Gantaume [mailto:[hidden email]]
Sent: Wednesday, October 19, 2005 5:42 PM
To: [hidden email]
Subject: [sqlite] sqlite3_open16 with unicode string


Hi all,
I have a little problem when trying to open database that contain Unicode caracters:
Here is a small sample:


wstring lPath = L"c:\\\x4ECA\x6708 database.db";
DWORD lReturn = sqlite3_open16((void *)lPath.c_str (), &this->cdb);

This works correctly, but the problem is that the database name created is not correct:
I get something like: [今月 database.db] instead of [今月database.db]
I guess that I have a problem a string encoding, but I can not find any solution.

I have also tried to use sqlite3_open with encoding the name UTF8, but I get exactly the same result.

Can anyone help?
Thanks a lot
       
Benoît Gantaume
R&D Manager.
DMAILER