I have a Motif application, which I have recently "upgraded" to use
antialiased fonts (with XFT) and UTF-8 encoding, as OpenMotif 2.3
enables me to do this.
Everything works fine, just the window and dialog titles are displayed
incorrectly, they use iso8859-1 encoding. So it works OK for English,
but not so well for other languages with characters >128.
I am using KDE on SUSE 10.3
To set the window title, I set the string with XmNdialogTitle resource.
In the old days, there was no need to tell the encoding of the
Widget's window title. So I guess Motif lacks a way to tell the
character encoding for the title. Is there something I do not know about
Motif, or is there a way to set window title from Xt or X?
Other programs like Firefox have no problem displaying window
title with various national characters.
Thank you for your help,
Dušan Peterc
http://www.arahne.si
> I have a Motif application, which I have recently "upgraded"
> to use antialiased fonts (with XFT) and UTF-8 encoding, as
> OpenMotif 2.3 enables me to do this.
> Everything works fine, just the window and dialog titles are
> displayed incorrectly, they use iso8859-1 encoding.
It's not too surprising that the window title would be subject
to different rules as it's not purely internal to the toolkit.
It's also used by the window manager, which might very well be a
ten year old TWM.
> is there a way to set window title from Xt or X?
Xlib has XStoreName(). According to the man page, "if the string
is not in the Host Portable Character Encoding, the result is
implementation-dependent."
> Other programs like Firefox have no problem displaying window
> title with various national characters.
Perhaps they set _NET_WM_NAME. It's a UTF-8 counterpart to
ICCCM 2.0's WM_NAME and an X Desktop Group extension.
http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html
--
André Majorel <URL:http://www.teaser.fr/~amajorel/>
"Cette supposition rappelle assez celle de ce prédicateur qui, en
pleine chaire, faisait remarquer à ses fidèles la bonté de Dieu qui
avait placé les rivières auprès des villes." -- Alexandre Dumas
Actually, Google code search for _NET_WM_NAME
http://www.google.com/codesearch
found the rest of the solution for me.
Best regards,
Dušan Peterc
http://www.arahne.si