views:

51

answers:

1

I'm developing an app that requires the storage of Portuguese characters. I was wondering if I need to do any configuration to prepare my SQLite db to store those considered special characters. When I query a db table that contains those characters I get a '?' (without quotes) in their place.

best regards,

mp

A: 

Probably an encoding problem. Is your DB/client using UTF-8? you should check your DB encoding with PRAGMA encoding;, be sure your client does it's job using the same encoding and verify that the encoding used handles well those Portuguese chars.

RC
I'm using sqlite3 on my mac as the client, so it should be handling those just fine... How would I make sure that it is handling Portuguese characters correctly, though? I just checked the DB encoding and it returned UTF-8.
ForeignerBR
UTF-8 is OK for Portuguese. Either you DB contains '?' (i.e. bad DB alimentation in first place), either your console or client can't handles UTF-8. I would try another client like a scripting language (python) to see what's really in the DB or try to create a new DB and put some of those chars in a table then try your process again with this new DB, to see if you get '?'.
RC