It depends (I know, not the answer you had hoped for!)

How are your query and parameter strings obtained (command line, compiled 
static strings, files, gui, other)? 

What encoding are these input strings?

Are you using sqlite3_exec, sqlite3_prepare or sqlite3_prepare16 to execute the 
query?

The key is to identify how the strings are encoded in the first place.  Then, 
you need to decide whether you'll use the sqlite UTF8 or UTF16 functions.  Once 
you have know these, you can figure out how to convert from input to output 
using platform specific or other conversion code.  If you are on a platform 
that has Unicode strings available to you, you can go straight from those 
Unicode strings to the sqlite3_*16 functions without conversion.

Pat

-----Original Message-----
From: Pedro J. Vivancos [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 12:19 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Encoding with spanish characters

No, I'm no sure. How can I test it? I've just started to learn C/C++ and 
I have no idea how to do it.

Thanks again.
Pedro.


Will Leshner escribió:
> On 7/12/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote:
>
>> I'm developing a program using C++ and SQLite3 as database. I have a
>> problem with encoding when I try to execute a SQL query with some
>> characters like "ñ, á, é, í, ó, ú". My db is UTF-8 encoded and when I'm
>> debugging I can see that the sentence is right but I have no result.
>> However, when I try to execute the same sentence by using the SQLite3
>> console I have no problem.
>
> Are you sure your query string is also encoded as UTF8?
>
>

Reply via email to