unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Jürgen Hötzel" <juergen@hoetzel.info>
Cc: emacs-devel@gnu.org
Subject: Re: BOM (byte order mark) in process stdout and stderr
Date: Thu, 25 Jun 2015 20:28:38 +0300	[thread overview]
Message-ID: <83616belyx.fsf@gnu.org> (raw)
In-Reply-To: <CANmXxHNnD2+c-FCS6BN404DwYnSXHD3Y-2ShKSPcE6VEy9iHBg@mail.gmail.com>

> From: Jürgen Hötzel <juergen@hoetzel.info>
> Date: Thu, 25 Jun 2015 18:41:50 +0200
> 
> (let ((default-process-coding-system '(utf-8-with-signature .
> utf-8-with-signature)))
> (start-file-process
> "BOM"
> (generate-new-buffer "*bom-test*")
> "~/tmp/Hello.exe"))
> 
> This results in the following process-buffer (hexl-mode):
> 
> 00000000: efbb bf53 5444 4f55 540a 5354 4445 5252 ...STDOUT.STDERR
> 00000010: 0a0a 5072 6f63 6573 7320 424f 4d20 6669 ..Process BOM fi
> 00000020: 6e69 7368 6564 0a nished.
> 
> The stdout BOM was correctly removed but the stderr BOM is still present.
> 
> According to
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Output-from-Processes.html
> 
> there is now way to handle stderr separately. I made this workaround for the
> Emacs fsharp-mode:
> 
> https://github.com/juergenhoetzel/fsharpbinding/commit/d0d3600c38d0e9f47a621583d0fc82685feda196
> 
> Are there any better solutions?

You didn't tell what version of Emacs do you want this to be solved.




  reply	other threads:[~2015-06-25 17:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 16:41 BOM (byte order mark) in process stdout and stderr Jürgen Hötzel
2015-06-25 17:28 ` Eli Zaretskii [this message]
2015-06-25 18:37   ` Jürgen Hötzel
2015-06-25 19:37     ` 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=83616belyx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juergen@hoetzel.info \
    /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).