[Top][All Lists]

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

BOM (byte order mark) in process stdout and stderr

From: Jürgen Hötzel
Subject: BOM (byte order mark) in process stdout and stderr
Date: Thu, 25 Jun 2015 18:41:50 +0200


I compiled  this C#/Mono program on an UTF-8 GNU/Linux System

using System;

public class Hello
    static void Main()

and used this elisp code to get the process output:

(let ((default-process-coding-system '(utf-8-with-signature . utf-8-with-signature)))
   (generate-new-buffer "*bom-test*")

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:


Are there any better solutions?


reply via email to

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