--- you can reply above this line ---
New issue 101: devdraw _xsetlabel corrupts utf8 strings
https://bitbucket.org/rsc/plan9port/issue/101/devdraw-_xsetlabel-corrupts-utf8-strings
sqweek:
Running p9p from hg tip, I tried to set 9term's window title to a simple unicode string:
{{{
% label β
% xprop
<snip>
WM_LOCALE_NAME(STRING) = "C"
WM_ICON_NAME(STRING) = "β"
WM_NAME(STRING) = "β"
}}}
I assume WM_LOCALE_NAME is defaulting to "C" because I don't see any p9p code setting that. I'm not sure how to change the default as AFAIK I've set all my OS locale settings to utf-8.
In other terminals, "label β" works as expected, so I had a look through the p9p code and found in src/cmd/devdraw/x11-init.c:/_xsetlabel a call to XSetWMProperties(). If I instead use Xutf8SetWMProperties() via the attached patch, "label β" now works in 9term.
I suspect a more robust fix would be to have WM_LOCALE_NAME set to a utf8 locale, but I lack the knowledge of X required for that and I'm not sure if p9p is supposed to support non-utf8 locales.
-sqweek
--
This is an issue notification from
bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.