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
|
||||
(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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue