0

I can't really get it right. I've created a database file with sqlite command interpreter and connected it to my Java program (JDBC driver is ok, included, working properly so far). By the way, working in NetBeans.

When i make a query like SELECT * FROM DIRS; and supposing to get some cyrillic names I get the following:

0 «  C:\db\main\ 3

1   C:\db\salad\ 8

2 ¥á¥ C:\db\dessert\ 1

Structue of table is id-DisplayName-Path-Size. So, displayname, that should be shown in Russian, prints out wrong.

If I create a database with Java, it runs ok.

How can I solve it? It's supposed to use with databases created before, so I wouldn't create my own in final project.

vladfau
  • 1,003
  • 11
  • 22
  • 1
    How is the data in the database encoded? UTF-8? –  Nov 12 '13 at 13:41
  • Probably, Windows shell is not rendering UTF-8 characters! Try `CHCP 65001` command before calling `sqlite3.exe`. – LS_ᴅᴇᴠ Nov 12 '13 at 13:55
  • @LS_dev the output is in console of NetBeans or in Windows shell. In sqlite shell it ok. Let me check it with file output – vladfau Nov 12 '13 at 13:59
  • What was supposed to be shown instead of `¥á¥`? `ТЅУЁТЅ`? – LS_ᴅᴇᴠ Nov 12 '13 at 14:05
  • @LS_dev it's supposed to be shown 'ЖЖЖЖ'. I solved problem by using SQLite Database Browser, but it's not a proper one. 'pragma encoding' shows UTF-8 in both. – vladfau Nov 12 '13 at 14:13

0 Answers0