From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 60872@debbugs.gnu.org, Jonas Bernoulli <jonas@bernoul.li>,
emacs18@gmail.com
Subject: bug#60872: 29.0.60; emacsql broken after Jan 12 change
Date: Tue, 17 Jan 2023 14:10:13 +0100 [thread overview]
Message-ID: <87ilh5cnnu.fsf@gmail.com> (raw)
In-Reply-To: <83y1q12utx.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Jan 2023 14:45:30 +0200")
>>>>> On Tue, 17 Jan 2023 14:45:30 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> If I use
>>
>> (coding-system-for-read 'utf-8)
>>
>> instead it all works fine.
Eli> coding-system-for-read or coding-system-for-write? The offending
Eli> commit didn't change anything about decoding, it only changed how
Eli> utf-8-auto behaves on _encoding_. So I expect the problem to be with
Eli> coding-system-for-write.
Youʼre right, Iʼd inverted my testing.
This fails:
(coding-system-for-write 'utf-8-auto)
(coding-system-for-read 'utf-8)
This works:
(coding-system-for-write 'utf-8)
(coding-system-for-read 'utf-8-auto)
Eli> Anyway, it sounds like someone else thought utf-8-auto is about EOL
Eli> format? Setting coding-system-for-write to utf-8-auto makes no sense;
Eli> that coding-system's _only_ raison d'être is for using in
Eli> coding-system-for-read, i.e. when decoding stuff that may or may not
Eli> start with a BOM.
Is it enough of an error for us to silently replace `utf-8-auto' with
`utf-8' when itʼs specified for `coding-system-for-write'?
Eli> Jonas, any idea why these coding-systems are used in
Eli> emacsql-sqlite.el? The Git log of the package offers no explanation,
Eli> and I find no references to it in Issues or PRs around the date of the
Eli> commit.
Eli> If indeed there's sometimes a need to send to the process stuff that
Eli> is encoded in UTF-8 with BOM, then instead of binding
Eli> coding-system-for-write around start-process, you should set it using
Eli> set-process-coding-system only _after_ the process starts, because the
Eli> way the code is written now, utf-8-auto is also used to encode the
Eli> command-line arguments to the sub-process, and so, for example,
Eli> fullfile (which I presume is a file name?) gets the BOM prepended, and
Eli> I'm guessing the program emacsql-sqlite isn't prepared for that, and
Eli> exits abnormally.
Either that or use `make-process' directly and pass `:coding'
Robert
--
next prev parent reply other threads:[~2023-01-17 13:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 4:50 bug#60872: 29.0.60; emacsql broken after Jan 12 change Richard Kim
2023-01-17 10:02 ` Robert Pluim
2023-01-17 12:45 ` Eli Zaretskii
2023-01-17 13:10 ` Robert Pluim [this message]
2023-01-17 13:38 ` Robert Pluim
2023-01-17 13:58 ` Eli Zaretskii
2023-01-17 14:42 ` Robert Pluim
2023-01-17 14:54 ` Eli Zaretskii
[not found] ` <878ri13xt1.fsf@bernoul.li>
2023-01-17 17:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilh5cnnu.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=60872@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=emacs18@gmail.com \
--cc=jonas@bernoul.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).