tags:

views:

85

answers:

2

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.

+1  A: 

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.

J. Loomis
Direct manpage links might be easier: http://www.xfree86.org/current/XmbLookupString.3.html http://www.xfree86.org/current/XwcLookupString.3.html
ephemient
+1  A: 

There is also a Xutf8* family of functions that can be used for this, specifically, there exists a Xutf8LookupString(). X*LookupString man page

hnsr