Hi again :)

I solved the problem before coming to this forum today thanks to Bert. Also,
I found Kevin's answer correct, that is, the problem was with cmd.exe. By
default, it uses code page 850. When I have changed the code page to 65001,
an equivalence of UTF-8 (I think), everything has started working correctly.

I have tested two approaches now. 
1. 
With proper code page in console, I have created and imported table via
console using sqlite3 imieniny.db < myfile.sql. It however requires that
coding is UTF-8. Otherwise, the default coding 850 has this fantastic
(*caugh) property that converts all non ANSI characters into their closets
equivalence--this exactly happened to me.
2. 
Bert has also suggested to use .read command inside sqlite3. The text was
imported untouched into database, even though the code page was set to
default 850. However, reading from tables gave an output  with unrecognised
characters.

I've changed the code page to 65001 by executing command
chcp 65001
at start.

Because it would be annoying to changed the code page at each start, I
decided to make it available every time I run the command processor. I have
found the way how to do it here:
http://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8

I've added extra variable
"Autorun"="@chcp 65001"

to windows register (Windows 7 Home Premium 64bit) in following register
key:
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]

Thanks for your assistance with that :)




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/SQLite-converts-all-unicode-characters-into-ANSI-tp65589p65609.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