Reputation: 4458
I have set up my NHibernate app to use SQLite as the backend database for a small project. I'm using mapping by code to connect my entities to the database. Everything works fine but one thing: the data returned from the database has no Croatian special characters. When opening the database with SQLite administrator, the characters are shown correctly, but when fetched via a NHibernate Linq query, the special characters are shown as a black box with a question mark in it. I am using the following connection string:
"Data Source=D:\DATA\TEST.DB;version=3";
Is there any setup needed (in the database, the connection string or somewhere else) to make the characters show up correctly?
Upvotes: 1
Views: 264
Reputation: 16721
Try using connection string with predefined encoding settings:
"Data Source=D:\DATA\TEST.DB;version=3;UseUTF8Encoding=True;"
Upvotes: 2