[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sqlite3

From: Eli Zaretskii
Subject: Re: sqlite3
Date: Tue, 07 Dec 2021 05:23:54 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Mon, 06 Dec 2021 21:35:47 +0100
> Eli Zaretskii <eliz@gnu.org> writes:
> >>    This function is optimized for speed when the input string is
> >>    already a valid UTF-8 sequence, i.e. there are neither 8-bit raw
> >>    bytes nor any UTF-8 sequences longer than 4 bytes in the string's
> >>    contents.
> >
> > ??? This says that if the string is a valid UTF-8, the function will
> > work very fast, so what's the problem?
> I'm not sure whether what we're getting from sqlite is valid UTF-8.
> (This was in the opposite direction; decode_string_utf_8.)  But the
> other direction should be OK so long as we're checking that it's not a
> unibyte >128-char string.

Yes, I was talking about the other direction, from Emacs to sqlite,
i.e. encoding.  For decoding stuff from sqlite to Emacs, I agree that
code_convert_string_norecord is the right approach, in case someone
put non-UTF-8 bytes in the DB.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]