Well, wcstombs uses WideCharToMultiByte() internally, with some more
locality checks added in.  Maybe you are using it wrong?

If you cant get that to work, libiconv is great for converting charsets.

Is there any reason you can't use sqlite 3.x?  It has native unicode support.


On Tue, 02 Nov 2004 15:50:59 +0000, Liz Steel <[EMAIL PROTECTED]> wrote:
> Hello - I hope somebody can help me!
> 
> I am using SQLite version 2.8.13 as a DLL with a windows C++ application. I
> have the SQLITE_UTF8 macro defined.
> 
> I have no problems adding and retrieving strings to and from the database -
> I am using WideCharToMultiByte and MultiByteToWideChar to convert from
> CString (Wide) to char * (Multibyte).
> 
> (Previously I was using wcstombs and mbstowcs to convert, but this doesn't
> support Greek and Russian characters, and I don't think it was actually
> converting the strings properly.)
> 
> However, when I call sqlite_open with a multibyte string, it doesn't seem to
> work as I expect.
> 
> To clarify: I have a database name with Swedish characters in, which are
> converted to multibyte characters, however, the filename that is created
> treats each of the characters separately, which then causes problems later.
> As an example, the string "Ãndrad" is converted to "Ãândrad".
> 
> If I use wcstombs to convert the filename string, this works OK for Swedish
> characters, but then doesn't work for Greek characters.
> 
> Does anyone have any ideas?
> 
> Thanks,
> 
> Liz.
> 
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends
> http://www.msn.co.uk/messenger
> 
> 


-- 
Cory Nelson
http://www.int64.org

Reply via email to