|
|
#1 |
|
Registered User
Join Date: Apr 2008
Posts: 7
|
Special Characters in Query Array
Hello,
We have an SQLite database with special characters in, namely German language characters such as - ö,ü,ä,ë,ď. Unfortunately in the array returned by the query statement these characters appear differently, normally with a capital Ă and a 'paragraph' line return sort of character. Can anyone suggest any tips for correcting this? Can I set the SQLite query character set to accept UTF-8 or something similar? Deadline looming so any advice greatly received. Many thanks, Alex Button |
|
|
|
|
|
#2 |
|
Plugin Developer
Join Date: Jun 2002
Location: Germany
Posts: 2,327
|
Hi Alex,
on which OS is that happening? How was the data inserted into the database? (SQL query, importCSV, imported SQL file,...) also, try to set System.useCodepage = true; before instanciating the SQLite class. |
|
|
|
|
|
#3 |
|
Registered User
Join Date: Apr 2008
Posts: 7
|
Hi
We're using Windows XP (although it is also happening in Vista) and the data was entered into the database manually. Tried setting System.useCodepage = true; before the SQLite.as class is first called, but to no avail! If we run select statements using the SQLite Database Browser the characters are searched and returned as expected. We are using the non-plugin version of your tool - i.e. sqlhelper.exe added to files in SWF Studio (v3.4). Command is executed like this: var queryAuthors :Object = localDB.select({command:strSelect}); We use the var queryAuthors.result to populate an array, and this has the incorrect characters in it. Any further tips? Thanks. |
|
|
|
|
|
#4 |
|
Plugin Developer
Join Date: Jun 2002
Location: Germany
Posts: 2,327
|
could you send me the database so I can have a look at it?
I assume something with the internal codepage of the database file went wrong but I´d need the db file to investigate this further. If you don´t want to post the file here you can mail it to us at support @ software-and-solutions.de A stripped down version of the db that shows this problem would do as well. I haven´t heard of any problems with codepages since the first beta,... If you open the database in the example project that comes with the connector, do you see the same behaviour? |
|
|
|
|
|
#5 |
|
Plugin Developer
Join Date: Jun 2002
Location: Germany
Posts: 2,327
|
Forgot to ask, what exactly do you mean by that? Did you used another tool to create the database?
|
|
|
|
|
|
#6 |
|
Registered User
Join Date: Apr 2008
Posts: 7
|
Unfortunately we don't have the example project, I will send a stripped down version of the database asap.
Thanks |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Apr 2008
Posts: 7
|
The tool we used was 'SQLite Database Browser.exe' to view and edit the database content. Sourced from here:
http://sqlitebrowser.sourceforge.net/ Thanks. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Jul 2010
Posts: 1
|
Much the same problem
Hi, I'm building a .sqlite database with a service built in java (using the SQLJetDB lib) and the DB is created fine. It's UTF-8, and when I browse the DB with the Firefox SQLite Manager plugin, I see all my data in there, even trademark and copyright symbols. When I query the database from within flash, I'm getting garbled characters (specifically, we have Bluetooth(r) that comes into flash as BluetoothAr).
I've noticed in your World.db in the example, the characters show up in my SQLite Manager as questionmarks in black diamonds instead of say the n with the ~ over it. So, how did you insert the data into the database? Or, is there a way to set the encoding coming out from the database? |
|
|
|
|
|
#9 |
|
Plugin Developer
Join Date: Jun 2002
Location: Germany
Posts: 2,327
|
Hi JImi,
the world.db was created using the sqlite.read command, which should work fine if the file you are reading is in UTF-8 (without BOMs) ANSI-encoded files should work as well. Currently there is no way to set the encoding the sqlhelper is using. However the new sqlite plugin should not suffer from this problems, if you wanna give it a try drop me a mail at support @ software-and-solutions.de |
|
|
|