
14 Jan
2009
14 Jan
'09
5:46 p.m.
Hello. There is problem with `spawn' function as well with *spawn family from XMonad.Util.Run. They mangle unicode symbols which are passed to them. This is because they make use of `executeFile' which silently truncate each letter to one byte. Simplest workaround is to use utf8-string package. It would work only on systems with UTF8 locales but now they are majority I hope.
import Codec.Binary.UTF8.String -- | Unicode safe spawn spawnU :: MonadIO m => String -> m () spawnU = spawn . encodeString
The same possible for all *spawn functions. I think it's worth to include unicodified versions to XMonadContrib but not sure is there anyone who need such functionality -- Alexey Khudyakov