Hello,
thanks for your answers.

I downloaded both precompiled binaries and shell for windows from
www.sqlite.org.

The script looks like this:
CREATE TABLE IF NOT EXISTS imiona (
        id INTEGER PRIMARY KEY,
        data TEXT,
        imie1 TEXT,
        imie2 TEXT,
        imie3 TEXT);

INSERT INTO imiona (data,imie1,imie2,imie3) VALUES
('01/01/2012','Masława','Mieczysława','Mieszka'),
('16/01/2012','Marcelego','Walerii','Włodzimierza'),
('17/09/2012','Franciszka','Lamberty','Narcyza');


As you can see, it contains accents. The script was written in Notepad++
that controls which charset coding is used but I also double checked it in
Notepad and it indicated UTF-8; it can also be confirmed by reading the
script text file in Hex editor that shows BOM at the beginning:
[*ef bb bf* 43 52 45 41 54 45 20 54 41 42 4c 45 20] [CREATE TABLE]

The sequence at start 0xEF, 0xBB, 0xBF confirms the file has been created
using UTF-8. I tested copy / paste between two text editors in windows 7 and
everything works ok; texts with accents are copy / pasted without losing
accents. I have noticed though that when I used command line I got this
error:

D:\Wydarzenia\Events>sqlite3 imieniny.db < test.sql
Error: near line 1: near "´╗┐CREATE": syntax error

I then used the conding UTF-8 without BOM and the command was accepted but
unfortunately I get the strange result:
sqlite> select * from imiona;
1           01/01/2012  Masława    Mieczysława  Mieszka
2           16/01/2012  Marcelego   Walerii       Włodzimie
3           17/09/2012  Franciszka  Lamberty      Narcyza
4           01/01/2012  Masława    Mieczysława  Mieszka
5           16/01/2012  Marcelego   Walerii       Włodzimie
6           17/09/2012  Franciszka  Lamberty      Narcyza

Now, I don't know how to test if the text is OK because SQLite2009Pro
displays everything converted to ANSI even ithough I set it to UTF-8 :/
Perhaps this program is not very good then. What would you recommend,
instead?

once again thanks for your effort towards this. I am really really surprised
this behaviour.




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/SQLite-converts-all-unicode-characters-into-ANSI-tp65589p65602.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to