From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Sun, 12 Dec 2021 12:06:37 +0200 Message-ID: <834k7ep26q.fsf@gnu.org> References: <87tufmjyai.fsf@gnus.org> <87sfv5ljxn.fsf@gnus.org> <8735n5leza.fsf@gnus.org> <837dch1qox.fsf@gnu.org> <87ee6odu65.fsf@gnus.org> <83h7bjye0b.fsf@gnu.org> <87sfv360np.fsf@gnus.org> <83lf0vw6sg.fsf@gnu.org> <87k0gd1cl3.fsf@gnus.org> <83zgp8svkw.fsf@gnu.org> <83ilvvqwu8.fsf@gnu.org> <87bl1mihb7.fsf@gnus.org> <83k0gapacz.fsf@gnu.org> <874k7ee01l.fsf@gnus.org> <838rwqp4x7.fsf@gnu.org> <87o85mchkg.fsf@gnus.org> <87k0gacgl7.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39525"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 12 11:07:38 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mwLla-000A3f-8c for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Dec 2021 11:07:38 +0100 Original-Received: from localhost ([::1]:33246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwLlY-00024v-Nt for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Dec 2021 05:07:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwLko-0001KT-NG for emacs-devel@gnu.org; Sun, 12 Dec 2021 05:06:50 -0500 Original-Received: from [2001:470:142:3::e] (port=55902 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwLkk-0005VH-1w; Sun, 12 Dec 2021 05:06:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=L6GtF06iEFZs22z2N33NUuu0hmICRqI/fIqyo2PmboY=; b=VYQwf8llbJRy prpqT0402+4VuJFgM8JAddAQvkSxBUdbmgSOCKM/CGiFLHpGvyGxyQWtj7V+PiiqG+YK0WolRVVXf r8r6QlMEuI3aNnzHnD4DZUGqrgq66HBQ8M0CBMAZ3nDFnMNveFoyrve9GFwb7qqkWg8bb9++fPKPD 01OXtvgnO6h+sxKqdMZl8/a3URAmdCNNsF8+Vlunoh9AJyimcPi9X39XpnVaTZM13C+potm5ahyoI tkGdmiQIir4kZ+98Lgm5XsHo5Wi5fY7qRU/qkR6WtLSPCuG6yv9biJPsOCKL+9ROifNNtObZLVJTl yUjaulJpXAXt6NY1OOaSMw==; Original-Received: from [87.69.77.57] (port=3283 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwLkj-00089t-SW; Sun, 12 Dec 2021 05:06:46 -0500 In-Reply-To: <87k0gacgl7.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 12 Dec 2021 10:33:56 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281783 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Sun, 12 Dec 2021 10:33:56 +0100 > > Lars Ingebrigtsen writes: > > >> So the question is: do we tolerate eight-bit raw bytes in file names > >> passed to sqlite3? > > > > If this is really the case (and the documentation isn't just glossing > > over details), then I guess we don't tolerate that? > > I did some googling, and it seems like the documentation is correct > here -- the file name passed to sqlite3_open_v2 should indeed be utf-8 only. 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? I asked a question about this on the SQLite forum, let's see what the gurus there tell.