FMDB doesn't output to UTF-8 encoding

236 views Asked by At

I'm new to FMDB and I'm following this tutorial. I create the database in terminal. I'm having a problem after I add my database to xcode and compile. It is not automatically in UTF-8. There are weird characters so there are lots of errors and it won't compile. Here's a screenshot: You can see all the weird characters.

1

There are 1 answers

2
ccgus On BEST ANSWER

SQLite is a binary format, and as such, you won't be able to view it or compile it in Xcode. Instead, you want to make sure it is treated as a resource like images. Make sure it's copied to your resources folder as well.

FMDB + SQLite does UTF-8 just fine- but the Xcode editor isn't the way to view it (you'll have to get at its contents pragmatically).