bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order ma


From: Eli Zaretskii
Subject: bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark
Date: Sat, 08 Aug 2009 18:29:19 +0300

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: 4047@emacsbugs.donarmstrong.com,  bogossian@mail.com
> Date: Sat, 08 Aug 2009 16:29:31 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > 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.

If encode_coding_string would leave unibyte strings alone (as I think
it should, unless there's a good reason not to), the absolute
precedence you mention would not matter.  Or, if there _is_ a good
reason for encode_coding_string's current behavior, we could avoid
encoding unibyte strings in the command-line arguments (although
admittedly that would be a kludge).

> IMHO call-process should not use coding-system-for-write for
> encoding the command line

But if some of the command-line arguments are file names, say, we do
need to encode them, don't we?

> if at all there should be a separate override.

That'd be fine by me, if there's no better alternative.





reply via email to

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