[Xcb] [PATCH:xwininfo 0/2] Handle UTF8 window names & EMWH hints

Alan Coopersmith alan.coopersmith at oracle.com
Thu Jul 1 00:11:21 PDT 2010


James Cloos wrote:
> It may be that xterm sends bogus utf8 in the third case; xwininfo may
> just need to detect bad utf8.  And I cannot tell from the code or the
> commit log how xwininfo guesses in the first two cases that the STRING
> is actually UTF-8.  Is it just because xwininfo’s locale is .UTF-8?

Probably - it's actually assuming that STRING is something it can just
printf(), though that's not strictly true, since STRING is defined in
ICCCM to be ISO-8859-1 so should probably also be iconv()'ed.

> In any case, perhaps it should do something better when the UTF-8 is
> not valid?

I copied in the validation code from xprop for now - ideally this would
end up in libxcb-icccm or libxcb-textprop-encoding or whatever we end up
with to share all this code.

I did just notice that X.Org's app/luit contains what appears to be a
fairly self-contained iso2022.c & .h - perhaps that could be usable in
such a library as well?

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list