From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 4047@emacsbugs.donarmstrong.com, bogossian@mail.com
Subject: bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark
Date: Mon, 10 Aug 2009 15:45:29 -0400 [thread overview]
Message-ID: <jwvljlrlapn.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <m2ws5e7510.fsf@igel.home> (Andreas Schwab's message of "Sat, 08 Aug 2009 16:29:31 +0200")
>> Btw, I doubt that any encoding that uses BOM can ever be appropriate
>> for encoding command-line arguments. Maybe we should treat them
>> specially in call-process and its ilk.
> The bug is that hexlify-buffer assumes that manually encoding the
> command line stops call-process from encoding it again, which does not
> work: coding-system-for-write takes absolute precedence. IMHO
> call-process should not use coding-system-for-write for encoding the
> command line, if at all there should be a separate override.
I believe we've bumped into this problem already in the past.
To me, it's clear that call-process should be careful about coding
arguments, since the coding-system to use may depend on the argument
and/or the command, so in general the caller will want to specify
explicitly some coding system for the arguments, including a different
coding system for each argument. An override var might be a good idea,
but it won't cater to the case where each arg requires a different
encoding, so the most important thing is to make sure that unibyte args
don't get re-encoded.
Unless Handa objects, I'd recommend we change encode_coding_string to be
a nop on unibyte strings (tho, we may want to let it obey EOL
conversions). If there are good reasons not to do that, then
Fcall_process should be changed to not call encode_coding_string on
unibyte strings.
Stefan
next prev parent reply other threads:[~2009-08-10 19:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 8:50 bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark Pierre Bogossian
2009-08-08 12:20 ` Eli Zaretskii
2009-08-08 13:22 ` Eli Zaretskii
2009-08-08 14:29 ` Andreas Schwab
2009-08-08 15:29 ` Eli Zaretskii
2009-08-08 15:47 ` Andreas Schwab
2009-08-08 17:24 ` Eli Zaretskii
2009-08-08 17:57 ` Lennart Borgman
2009-08-08 15:56 ` Lennart Borgman
2009-08-08 17:25 ` Eli Zaretskii
2009-08-10 19:45 ` Stefan Monnier [this message]
2009-08-11 0:51 ` Kenichi Handa
2009-08-14 9:02 ` Eli Zaretskii
2009-08-21 9:33 ` Eli Zaretskii
2009-08-21 12:18 ` Kenichi Handa
[not found] ` <83praof8mu.fsf@gnu.org>
2009-08-05 14:01 ` Pierre Bogossian
2009-08-06 17:49 ` Eli Zaretskii
2009-08-22 10:30 ` bug#4047: marked as done (23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark) Emacs bug Tracking System
2009-08-27 11:15 ` bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark Kenichi Handa
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvljlrlapn.fsf-monnier+emacsbugreports@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=4047@emacsbugs.donarmstrong.com \
--cc=bogossian@mail.com \
--cc=schwab@linux-m68k.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.