From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SsO8cmdlbiBIw7Z0emVs?= Newsgroups: gmane.emacs.devel Subject: Re: BOM (byte order mark) in process stdout and stderr Date: Thu, 25 Jun 2015 20:37:41 +0200 Message-ID: References: <83616belyx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30334965533f8405195becc2 X-Trace: ger.gmane.org 1435257509 7693 80.91.229.3 (25 Jun 2015 18:38:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 18:38:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 25 20:38:17 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z8C2T-000640-Jg for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2015 20:38:17 +0200 Original-Received: from localhost ([::1]:57019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8C2S-0006bF-Ub for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2015 14:38:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8C2P-0006b7-8F for emacs-devel@gnu.org; Thu, 25 Jun 2015 14:38:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8C2M-0007Qg-HP for emacs-devel@gnu.org; Thu, 25 Jun 2015 14:38:13 -0400 Original-Received: from nymeria.archlinux.org ([89.238.67.251]:37753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8C2M-0007QA-AI for emacs-devel@gnu.org; Thu, 25 Jun 2015 14:38:10 -0400 Original-Received: from nymeria.archlinux.org (localhost.localdomain [127.0.0.1]) by nymeria.archlinux.org (Postfix) with ESMTP id CC290408E4 for ; Thu, 25 Jun 2015 20:38:02 +0200 (CEST) Original-Received: from mail-ig0-f181.google.com (mail-ig0-f181.google.com [209.85.213.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: juergen) by nymeria.archlinux.org (Postfix) with ESMTPSA id 7589740855 for ; Thu, 25 Jun 2015 20:38:02 +0200 (CEST) Original-Received: by igbqq3 with SMTP id qq3so21425080igb.0 for ; Thu, 25 Jun 2015 11:38:01 -0700 (PDT) X-Gm-Message-State: ALoCoQna7DHUrBnzvbtZFY5GBS6hY6izId8OxYPILdYiOEZwZmlve+s7lwTYj+PIn5u11/U/BF2e X-Received: by 10.42.85.207 with SMTP id r15mr18206891icl.94.1435257481140; Thu, 25 Jun 2015 11:38:01 -0700 (PDT) Original-Received: by 10.64.63.51 with HTTP; Thu, 25 Jun 2015 11:37:41 -0700 (PDT) X-Originating-IP: [84.59.244.152] In-Reply-To: <83616belyx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 89.238.67.251 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187530 Archived-At: --20cf30334965533f8405195becc2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Jun 25, 2015 at 7:28 PM, Eli Zaretskii wrote: > > From: J=C3=BCrgen H=C3=B6tzel > > 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 presen= t. > > > > According to > > > http://www.gnu.org/software/emacs/manual/html_node/elisp/Output-from-Proc= esses.html > > > > there is now way to handle stderr separately. I made this workaround fo= r > the > > Emacs fsharp-mode: > > > > > https://github.com/juergenhoetzel/fsharpbinding/commit/d0d3600c38d0e9f47a= 621583d0fc82685feda196 > > > > Are there any better solutions? > > You didn't tell what version of Emacs do you want this to be solved. > GNU Emacs 24.5.1 --20cf30334965533f8405195becc2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= hu, Jun 25, 2015 at 7:28 PM, Eli Zaretskii <eliz@gnu.org> wrote:<= br>
> From: J=C3=BCrgen H=C3=B6tzel <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 prese= nt.
>
> According to
> http://www.g= nu.org/software/emacs/manual/html_node/elisp/Output-from-Processes.html=
>
> there is now way to handle stderr separately. I made this workaround f= or the
> Emacs fsharp-mode:
>
> = https://github.com/juergenhoetzel/fsharpbinding/commit/d0d3600c38d0e9f47a62= 1583d0fc82685feda196
>
> Are there any better solutions?

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

GNU Emacs 24.5.1

--20cf30334965533f8405195becc2--