From 037dd0f716e82568b005a78ee4d79fce0b886af3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 13 Feb 2009 05:02:37 -0400 Subject: Set coding-system-for-write when talking to ledger Otherwise, calling out to Ledger uses whatever the user's default happens to be, such as iso-latin-1. This caused problems for one user who had euro symbols encoding in utf-8 in his data file. --- lisp/ledger.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ledger.el b/lisp/ledger.el index d5b04712..525d0f61 100644 --- a/lisp/ledger.el +++ b/lisp/ledger.el @@ -1289,11 +1289,12 @@ This is done so that the last digit falls in COLUMN, which defaults to 52." (t (let ((buf (current-buffer))) (with-current-buffer buffer - (apply #'call-process-region - (append (list (point-min) (point-max) - ledger-binary-path ledger-delete-after - buf nil "-f" "-") - args))))))) + (let ((coding-system-for-write 'utf-8)) + (apply #'call-process-region + (append (list (point-min) (point-max) + ledger-binary-path ledger-delete-after + buf nil "-f" "-") + args)))))))) (defun ledger-run-ledger-and-delete (buffer &rest args) (let ((ledger-delete-after t)) -- cgit v1.2.3