x11: fix setting UTF-8 window titles for some special cases