I have an encoding problem in my database. This database is first imported form another app (written in .NET so microsoft app). So I get an .sql file and then I download it and run it in myphp admin and there I can see the varchars are in utf8.
Then I use this (WONDERFUL by the way) script to create a sqlite database AUTOMATICALLY:
https://gist.github.com/943776
Then I have my DB file and I put it in the assets folder of my app using basically this technique: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
to use the DB and not to create a new one.
Well everything works perfectly fine the only thing is my apopp is in spanish and the coding is not quite right for letters like è, é, ª etc.... I have checked with PRAGMA encoding;
but the encodign if utf-8, what do you advise me to do??? I mean a part from rewrtiging the DB???
Thanks a lot
Android sqlite uses
UTF-8
by default. And may only useUTF-8
andUTF-16
. Did you check to init your Strings retrieved from sqlite like this:You may also check the other options with pragma.
I found that SQLite Database browser 2.0 only shows Western (ISO Latin 1) correctly when importing a csv made in Numbers