XLookupString returning a UTF-8 code (Latin-1 to UTF-8)
Question
I'm trying to use the function XLookupString
.
According to the documentation, it is supposed to return a Latin-1 code. How could I convert it or what should I use instead this function so I get a UTF-8 code?
Solution
You need to read chapter 11 of the Xlib programming manual: google books link. You are looking for XmbLookupString()
or XwcLookupString()
but they are not drop-in substitutes for XLookupString()
. I am not an expert in this but this should point you in the right direction.
OTHER TIPS
There is also a Xutf8* family of functions that can be used for this, specifically, there exists a Xutf8LookupString()
. X*LookupString man page
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow