Andrew -- I took a look at your code and it should not be difficult to make
the strings work correctly with internationalized text. Basically, you just
need to figure out what encoding of text the external API's expect and then
call the appropriate conversion functions. For example, if the API's expect
UTF-8, then some variation of replacing XSTRING_DATA (string) with
NEW_LISP_STRING_TO_EXTERNAL (string, Qutf8) should do the trick. This
returns a string in alloca() space so there is no need to free it. (The GTK
code doesn't always do this currently but there is a pending patch among my
workspaces to fix this.)
ben