diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 8cea65a04..58ef9c761 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -145,8 +145,11 @@ See `+format/buffer' for the interactive version of this function, and ((eq output t) 'noop) ((let ((tmpfile (make-temp-file "doom-format")) (patchbuf (get-buffer-create " *doom format patch*")) - (coding-system-for-read 'utf-8) - (coding-system-for-write 'utf-8)) + (coding-system-for-read coding-system-for-read) + (coding-system-for-write coding-system-for-write)) + (unless IS-WINDOWS + (setq coding-system-for-read 'utf-8 + coding-system-for-write 'utf-8)) (unwind-protect (progn (with-current-buffer patchbuf