Bible Trivia Extreme wrote:
> On Tue, Sep 29, 2009 at 9:48 PM, Simon Slavin
> <slav...@hearsay.demon.co.uk>wrote:
>
>   
>> On 30 Sep 2009, at 2:25am, Bible Trivia Extreme wrote:
>>
>>     
>>> Is there something special I need to do in the C/Sqlite
>>> code to make this work properly?
>>>       
>> Which SQLite function calls are you using to run your INSERT commands ?
>>
>> Simon.
>>
>>     
>
> My psuedo code is as follows:
>
> sqlite3_open(...);
> sqlite3_exec(db, "PRAGMA encoding = UTF8-8", 0, 0, 0);
>
> char *query = "create table questions(q text, ans text)";
> sqlite3_exec(db, query, NULL, NULL, &errMsg);
>
> (loop over spanish .txt file here while inserting)
> sprintf(query, "INSERT INTO questions VALUES('%s', '%s')", question,
> answer);
>
> end of loop
> sqlite3_close(db);
Open your spanish.txt file in a hex editor.  The letter 'ñ' should be 
encoded as C3 B1.  If you see F1 instead, it means your file is in 
ISO-8859-1 or something similar.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to