-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary data incorrectly detected as text/numeric in "Browse Data" #2197
Comments
Interesting. Would you be ok to try the 3.12.0 alpha1 build and see if the problem still shows up? https://sqlitebrowser.org/blog/first-alpha-release-for-3-12-0/ |
Just checked with 3.12.0 alpha1 (it shows as 3.11.100 in the "About" screen). Unfortunately, both BLOBs still show as text. |
Thanks heaps for testing it @mbrijun. That means the bug is still in our latest code, and wasn't fixed over the ~year or so of changes in the since the 5.11.3 release. So, we'll need to investigate. @mgrojo Your kind of thing? @mbrijun With that "3.11.100" version numbering, it's because we need something less than "3.12.0". Otherwise update checks will go wrong when the proper 3.12.0 release is released. So, we're using high numbers (100 and above) for the 3.11.x bit until then. 😉 |
The presence of a sequence of bytes resembling a BOM does not guarantee that the data is text. We can in those cases use the detection provided by Qt. If the codec matches the one selected, we can consider that text. See issue #2197
@mbrijun It should be working in tomorrow's nightly build. Could you give it a try and confirm it? The presence of a sequence of bytes equal to a UTF BOM did assume that the data was text. Now, and additional check is done. @MKleusberg, maybe you could review the changes. Do you think it could fail in any way? I don't know how to test all the possible encodings with BOMs. |
Couldn't we have an override? So for database file X, column Y should be shown as Z. Don't know if/how/why it should be stored in the project file but for these weird edge cases, it would be useful to allow the user to override a guess made by DB4S. |
A possibility would be to assume that any column with data type set to BLOB, will be binary or image. Nevertheless, it should be a preference, because there are cases where a BLOB is set to store text with encodings different to UTF-8 or UTF-16. Let's see first if it's true that there are still edge cases. |
The presence of a sequence of bytes resembling a BOM does not guarantee that the data is text. We can in those cases use the detection provided by Qt. If the codec matches the one selected, we can consider that text. See issue #2197
Details for the issue
What did you do?
I have a SQLite table database with 76944 rows. The table has a BLOB column. All entries, except for the two entries below, are correctly identified as "binary" by the "Browse Data" tab.
What did you expect to see?
With "Automatically Adjust the editor mode to the loaded data type" enabled, I expected it to detect "Binary".
What did you see instead?
The autodetection detected these 2 cells as Text/Numeric. I had to disable autodetection and force the mode to "binary" to see the actual data. This may potentially be related to the bug 1772.
Useful extra information
The text was updated successfully, but these errors were encountered: