emacs-devel
[Top][All Lists]
Advanced

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

Re: sqlite3


From: Eli Zaretskii
Subject: Re: sqlite3
Date: Mon, 13 Dec 2021 14:49:03 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Mon, 13 Dec 2021 05:05:46 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > The documentation says so, yes.  But I looked inside the sqlite3
> > source, and I'm now confused: it seems like the Unix code path there
> > just uses the file name passed to the library without any checks or
> > changes?  The Windows code does convert from UTF-8 to the wchar_t
> > (a.k.a. UTF-16) encoding that is native to Windows.
> >
> > So it sounds like we should use ENCODE_FILE after all?
> 
> ENCODE_FILE on everything but Windows, but encode as utf-8 on Windows, it
> sounds like?  Pretty confusing interface.

ENCODE_FILE already uses UTF-8 on MS-Windows, so there's no problem.

The answers to my question mostly miss the point, but my take from
them is that indeed the UTF-8 requirement for file names is only
relevant for MS-Windows, whereas on Posix hosts sqlite3 just uses the
byte sequence we hand to it.  You can see the answers here:

  https://sqlite.org/forum/forumpost/02798ac965

So I'll be changing the couple of places where we pass file names to
sqlite3 to use ENCODE_FILE.



reply via email to

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