From 78efa5900a8670450139cfce52f30d6670ba1e09 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sat, 8 Aug 2020 22:21:40 +0530 Subject: Avoid double utf8 encoding With this change, xmobar should respect the data which it gets. Xmobar should just render the data instead of trying to encode it. --- src/Xmobar/X11/MinXft.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xmobar/X11/MinXft.hsc b/src/Xmobar/X11/MinXft.hsc index e593da0..acc60b2 100644 --- a/src/Xmobar/X11/MinXft.hsc +++ b/src/Xmobar/X11/MinXft.hsc @@ -164,7 +164,7 @@ foreign import ccall "XftDrawStringUtf8" drawXftString :: (Integral a1, Integral a) => AXftDraw -> AXftColor -> AXftFont -> a -> a1 -> String -> IO () drawXftString d c f x y string = - withArrayLen (map fi (UTF8.encode string)) + withArrayLen (map (fi . ord) string) (\len ptr -> cXftDrawStringUtf8 d c f (fi x) (fi y) ptr (fi len)) drawXftString' :: AXftDraw -> -- cgit v1.2.3