Hello SQLite users,
I am struggling with this very random and rare issue where last character of
string - always “]” in multiple columns is replaced with one or more unexpected
characters. We create the db within android app. We also use ContentValues for
safe inserts of rows into Table.
1) (DB locale PT_Brazil)
[-16384.0,-16384.0,-16384.0]
=>
[-16384.0,-16384.0,-16384.0Ԃ
3ҡ嶴u)
In this table from specific time until the data collection we could see certain
columns affected by this issue. Interesting thing is that there are other
columns which has basically same format “[data, data]” however these are
created with string concatenation where the affected fields were created using
StringBuilder:
StringBuilder sb = new StringBuilder();
sb.append("[");
for (int i = 0; i < array.length; i++) {
sb.append(String.valueOf(array[i]));
// retString = retString + String.valueOf(array[i]);
if ((i + 1) != array.length) {
sb.append(",");
}
}
sb.append("]");
return sb.toString();
It looks odd to me that StringBuilder would cause this but it is the only
difference I can see there. ( In other case it happened on string field created
by concatenation so it also works against this theory, however these might be 2
different issues…). See below screenshots from DB.
2) In another case it was “U” and only single occurrence in one cell per whole
table
(DB locale Thai)
Questions coming from these observed issues are:
- Why is the issue in first case so consistent for fields created with
StringBuilder?
- Is there anything we could do to avoid it or at least do some further
debugging?
- What could cause such a rare corruption in second case?
Additional note: we use only 1 instance of DB.
Do not hesitate to ask for more information if needed to better explain and
understand the issue.
Any ideas and suggestions are very welcome.
Thank you in advance.
Best Regards,
Pavel Machala
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users