diff --git a/core/cli/env.el b/core/cli/env.el index f13a838d3..0230ec9df 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -89,6 +89,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in doom-env-file))) (when (or force-p (not (file-exists-p env-file))) (with-temp-file env-file + (setq coding-system-for-write 'utf-8) (print! (start "%s envvars file at %S") (if (file-exists-p env-file) "Regenerating" diff --git a/core/core-lib.el b/core/core-lib.el index 85146ea4c..bf267c14e 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -118,6 +118,7 @@ unreadable. Returns the names of envvars that were changed." (env (with-temp-buffer (save-excursion + (setq coding-system-for-read 'utf-8) (insert "\0\n") ; to prevent off-by-one (insert-file-contents file)) (save-match-data