0

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?

Michael Mrozek
  • 169,610
  • 28
  • 168
  • 175
alvatar
  • 3,340
  • 6
  • 38
  • 50

2 Answers2

1

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
  • 196
  • 1
  • 6
  • 1
    Direct manpage links might be easier: http://www.xfree86.org/current/XmbLookupString.3.html http://www.xfree86.org/current/XwcLookupString.3.html – ephemient Nov 07 '09 at 01:46
  • The Google book is only a preview, but there is a [complete online version of the book](http://menehune.opt.wfu.edu/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/XLib_PG/sgi_html/ch11.html) — apparently there have been only "minor revisions" between both, Google's version being 3 years older or so. – Skippy le Grand Gourou Jul 17 '13 at 13:03
1

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

hnsr
  • 11
  • 2