Hello.
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?
Thanks.
Hello.
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?
Thanks.
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.
There is also a Xutf8* family of functions that can be used for this, specifically, there exists a Xutf8LookupString()
. X*LookupString man page