mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
fix double decode in debugWindow
At some point `peekCString` became locale aware. This is a double bug, since (a) `decodeString` was being applied to the result and (b) the locale might not be UTF-8, but the string being decoded always is. The fix is to use `peekCAString` which bypasses the locale decode, then continuing to do UTF-8 decode.
This commit is contained in:
parent
4bdcab8bf6
commit
4a60866ea4
@ -124,7 +124,7 @@ tryUTF8 :: TextProperty -> X [String]
|
||||
tryUTF8 (TextProperty s enc _ _) = do
|
||||
uTF8_STRING <- getAtom "UTF8_STRING"
|
||||
when (enc /= uTF8_STRING) $ error "String is not UTF8_STRING"
|
||||
map decodeString . splitNul <$> io (peekCString s)
|
||||
map decodeString . splitNul <$> io (peekCAString s)
|
||||
|
||||
tryCompound :: TextProperty -> X [String]
|
||||
tryCompound t@(TextProperty _ enc _ _) = do
|
||||
|
Loading…
x
Reference in New Issue
Block a user