From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: BOM (byte order mark) in process stdout and stderr Date: Thu, 25 Jun 2015 20:28:38 +0300 Message-ID: <83616belyx.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1435253360 1395 80.91.229.3 (25 Jun 2015 17:29:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 17:29:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?J=C3=BCrgen_H=C3=B6tzel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 25 19:29:12 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 1Z8AxZ-0006MF-1i for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2015 19:29:09 +0200 Original-Received: from localhost ([::1]:56786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AxY-0004dc-Di for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2015 13:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AxK-0004cb-W1 for emacs-devel@gnu.org; Thu, 25 Jun 2015 13:28:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8AxD-0007YB-LG for emacs-devel@gnu.org; Thu, 25 Jun 2015 13:28:54 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:46076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AxD-0007Y5-DY for emacs-devel@gnu.org; Thu, 25 Jun 2015 13:28:47 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NQI00I00FY1S300@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Thu, 25 Jun 2015 20:28:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQI00I7HGJXSH20@a-mtaout21.012.net.il>; Thu, 25 Jun 2015 20:28:45 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:187527 Archived-At: > From: J=C3=BCrgen H=C3=B6tzel > Date: Thu, 25 Jun 2015 18:41:50 +0200 >=20 > (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")) >=20 > This results in the following process-buffer (hexl-mode): >=20 > 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. >=20 > The stdout BOM was correctly removed but the stderr BOM is still pr= esent. >=20 > According to > http://www.gnu.org/software/emacs/manual/html_node/elisp/Output-fro= m-Processes.html >=20 > there is now way to handle stderr separately. I made this workaroun= d for the > Emacs fsharp-mode: >=20 > https://github.com/juergenhoetzel/fsharpbinding/commit/d0d3600c38d0= e9f47a621583d0fc82685feda196 >=20 > Are there any better solutions? You didn't tell what version of Emacs do you want this to be solved.