Subject: bug#54591: 29.0.50; sqlite-select returns blob result as multibyte string

From: Eli Zaretskii <[email-masked]>
Date: Sun, 27 Mar 2022 17:56:05 +0300

> From: Po Lu <[email-masked]>
> Cc: Yuan Fu <[email-masked]>,  [email-masked]
> Date: Sun, 27 Mar 2022 20:04:41 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > If we want to support non-text data in a blob, then yes, I think you
> > are right.
> 
> BTW, I thought things can go awry quickly if misformed sequences find
> their way into a multibyte string, so any data which isn't decoded or
> guaranteed to be valid in Emacs's internal superset of Unicode shouldn't
> be allowed to get into in a multibyte string.
> 
> Is that correct?

No.  Emacs converts any invalid byte sequences to raw bytes, which
have a special internal representation that cannot harm us.