GNU bug report logs -
#54591
29.0.50; sqlite-select returns blob result as multibyte string
Previous Next
Reported by: Yuan Fu <casouri <at> gmail.com>
Date: Sun, 27 Mar 2022 05:50:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Johannes Grødem <fjas <at> grdm.no>
> Date: Sat, 02 Apr 2022 08:33:55 +0200
>
> > Does SQLite TEXT allow the superset of UTF-8 encoding Emacs uses
> > internally to store characters that are not in Unicode? If it does, we
> > could indeed assume that any BLOB is binary data and not attempt
> > encoding/decoding it.
>
> SQLite documentation says this...
>
> TEXT. The value is a text string, stored using the database encoding
> (UTF-8, UTF-16BE or UTF-16LE).
>
> ...but it's still possible to store byte sequences that are not legal
> Unicode in there. This breaks the mentioned Python SQLite3 API, and
> possibly others, so maybe not great if someone wants to read tables from
> something else than Emacs.
This probably means we should reject text with raw bytes or characters
whose codepoints are beyond #x10FFFF, and document that those should
be encoded manually and stored as BLOBs.
Thanks.
This bug report was last modified 3 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.