Skip to content

Commit

Permalink
Remove BOM from process output, Refs fsprojects#413
Browse files Browse the repository at this point in the history
Even though the BOM from STDOUT is correctly handled by Emacs, there
is also a BOM present in STDERR. And there is no way to seperate STDOUT
and STDERR:

http://www.gnu.org/software/emacs/manual/html_node/elisp/Output-from-Processes.html
  • Loading branch information
juergenhoetzel committed Jun 25, 2015
1 parent f1cb5d5 commit d0d3600
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions emacs/fsharp-mode-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,10 @@ around to the start of the buffer."
(with-current-buffer (process-buffer proc)
(save-excursion
(goto-char (process-mark proc))
(insert-before-markers str)))

;; Remove BOM, if present
(insert-before-markers (if (string-prefix-p "\ufeff" str)
(substring str 1)
str))))
(let ((msg (fsharp-ac--get-msg proc)))
(while msg
(let ((kind (gethash "Kind" msg))
Expand Down

0 comments on commit d0d3600

Please sign in to comment.