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.
This commit is contained in:
parent
60019dc4b4
commit
037dd0f716
1 changed files with 6 additions and 5 deletions
|
|
@ -1289,11 +1289,12 @@ This is done so that the last digit falls in COLUMN, which defaults to 52."
|
||||||
(t
|
(t
|
||||||
(let ((buf (current-buffer)))
|
(let ((buf (current-buffer)))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
(let ((coding-system-for-write 'utf-8))
|
||||||
(apply #'call-process-region
|
(apply #'call-process-region
|
||||||
(append (list (point-min) (point-max)
|
(append (list (point-min) (point-max)
|
||||||
ledger-binary-path ledger-delete-after
|
ledger-binary-path ledger-delete-after
|
||||||
buf nil "-f" "-")
|
buf nil "-f" "-")
|
||||||
args)))))))
|
args))))))))
|
||||||
|
|
||||||
(defun ledger-run-ledger-and-delete (buffer &rest args)
|
(defun ledger-run-ledger-and-delete (buffer &rest args)
|
||||||
(let ((ledger-delete-after t))
|
(let ((ledger-delete-after t))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue