Thanks for your reply, however, wcstombs uses the default code page rather that UTF8, which is where I was going wrong with using it originally.

Unfortunately, it is unlikely that I will get approval to use libiconv as it is third-party software.

How much effort is involved with converting to SQLite 3.x? I'm not sure if I can get approval to use that either, but if that's the only way I'm going to get it to work, then I may have to do it.

Liz.

----Original Message Follows----
From: Cory Nelson <[EMAIL PROTECTED]>
Reply-To: Cory Nelson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13
Date: Tue, 2 Nov 2004 08:41:25 -0800

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

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger




Reply via email to