GNU bug report logs - #54591
29.0.50; sqlite-select returns blob result as multibyte string

Previous Next

Package: emacs;

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


Message #76 received at 54591 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54591 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#54591: 29.0.50; sqlite-select returns blob result as
 multibyte string
Date: Thu, 28 Apr 2022 21:59:21 -0700

> On Mar 31, 2022, at 4:54 AM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
>> Can we place the burden of knowing the type of the column on the
>> caller?  I mean, if they know it's a binary blob, they should tell us,
>> and then we don't decode it?
> 
> We could -- that was my last example:
> 
>>> "insert into test7 values (?, ?)" ["foo" (:binary binary)]
> 
> Or some syntax like that.  (And then never decode when we select from a
> BLOB column.)  But...
> 
>> (Of course, if there's a way of knowing the type, we could DTRT
>> automatically for each type.)
> 
> Yes, I'm hoping somebody else could have a look at the sqlite
> documentation and tell me I'm missing some obvious way to get that
> information.  :-)

I had a quick look at the log and didn’t see anything related to sql. So what do we end up doing? I think at least a notice could be added to the manual? Something like “Use (encode-coding-string xxx 'raw-text)) if you want to get out a binary blob”.

Yuan



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.