Fix xmessage in non-UTF-8 locales

`executeFile` encodes the arguments with the current locale's encoding,
and GHC as invoked during recompilation quite likely also outputs any
errors in the locale encoding, which we then read using `readFile` again
decoding in the locale encoding, so it really makes no sense to force a
specific encoding here. What was I thinking? :-)

Related: https://github.com/xmonad/xmonad/issues/322#issuecomment-900503386
Fixes: https://github.com/xmonad/xmonad/issues/324
Fixes: aa35ea1856 ("Make xmessage handle UTF-8 and export it")
This commit is contained in:
Tomas Janousek
2021-08-30 17:45:47 +01:00
parent aa18707c3e
commit 30719202b9

View File

@@ -459,7 +459,6 @@ xfork x = io . forkProcess . finally nullStdin $ do
-- | Use @xmessage@ to show information to the user.
xmessage :: MonadIO m => String -> m ()
xmessage msg = void . xfork $ do
setEnv "LC_ALL" "C.UTF-8"
executeFile "xmessage" True
[ "-default", "okay"
, "-xrm", "*international:true"