From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Tue, 07 Dec 2021 06:46:08 +0100 Message-ID: <87a6hdhsrj.fsf@gnus.org> References: <87tufmjyai.fsf@gnus.org> <87sfv5ljxn.fsf@gnus.org> <8735n5leza.fsf@gnus.org> <835ys11pxy.fsf@gnu.org> <87pmq9jyv1.fsf@gnus.org> <831r2p1or2.fsf@gnu.org> <87czm9jxjd.fsf@gnus.org> <83tuflzdc3.fsf@gnu.org> <878rwxjwt8.fsf@gnus.org> <83sfv5yu5x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34618"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 07 06:47:29 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 1muTK5-0008l5-OO for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Dec 2021 06:47:29 +0100 Original-Received: from localhost ([::1]:32910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muTK4-00022D-LX for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Dec 2021 00:47:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muTIv-0001HO-Nr for emacs-devel@gnu.org; Tue, 07 Dec 2021 00:46:19 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=34886 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muTIt-0005VN-QV; Tue, 07 Dec 2021 00:46:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z4V4nrg+JCkY7AZJ9YMcuq9kKQ864eJVpIPhB/ATeM0=; b=fukrsDcPA8lKM715Nima+rvXFH DSe5Bqk5q01ucwwJPEYe0km81XVbkV0tfP5oQ0ZzdR6motHGU9jZg1ia8nVhfWf+m0Mj/kip0IxUw TzjGRSH2JmZsEKNxdKUmD9qNPs1VCoTlNI88AnQku05tkBSIgoxArzDLhs5CTf6IJEas=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muTIm-0003tr-W5; Tue, 07 Dec 2021 06:46:12 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXRwqT69d6ogltd RjAgFA7///+u9mQ5AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UMBwUKH6NW0r0AAAG1SURBVDjLdZOB keMwCEWRsgUoqsBGLsArVEAmov+a7gN2Npn4yIyd4Rk+IETpfmmJrkEhWq8j7ogA9X/xis9ha83M mcpaeaGAeagqJfg7cwVwQygHQOCCR8pEeNK9NPPrt0Zxv16Um+Ge/A2KAOzpo0TTo2IB/R2UF5gL JL8kqmpPB7Cv7UemWHViTJlilIYoecV1dqvsItVMVjHATQQZShZmq72s5hGATXUt99xQZjSVW28B Zsf34wTNpjoiQoitXwd1iui8oUAAXe+F/wCLcETobxyPA3ilDVRv4PEGkHkOJdkNzGIi4uUKtyeq kv3HZamJ94NUjXUMAzhjgXo7gI5pJ6j7tqPpBZ0EOE/BNNDcE/2K2gKcC8eLiQOQp7L9CQANtApf lJsPQEe5aDFrgKqxPvoI8Kgy5B20NcCsQ6enojD2kaAupLIzfYkP73xtulsAQBE3H4nI8qOPocux Pq4h+631jib6kOlNx3WwiDYlbb0j/v2qDe8jbU8Z5zIEiD7S9nuTzh8gIgbOptM3WFTHsXCfqXx5 5ofGOUQ99+oEsSVXgDK/7A+UY5QpvS5c3KD/2z8/UYVxzpVNRQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMS0xMi0wN1QwNToxMDozMSswMDowMAPHp3QAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMTIt MDdUMDU6MTA6MzErMDA6MDBymh/IAAAAAElFTkSuQmCC X-Now-Playing: Simple Minds's _Sons and Fascination_: "Seeing Out the Angels" In-Reply-To: <83sfv5yu5x.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 Dec 2021 05:23:54 +0200") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:281207 Archived-At: Eli Zaretskii writes: > 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. I've added some more tests and stuff, and encode_string_utf_8 does indeed seem to do the right thing, so I've now pushed that bit. I'm still wondering about this bit: else if (EQ (type, Qinteger)) /* FIXME: Bignums? */ ret = sqlite3_bind_int64 (stmt, i + 1, XFIXNUM (value)); On a 32-bit system, this will truncate the value, I think? What's the correct incantation here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no