Recode X11 window title when saving and restoring
commitb178ee6cb6d8510a148da797389e661eefdfc819
authorKalle Olavi Niemitalo <kon@iki.fi>
Mon, 11 Apr 2011 18:38:52 +0000 (11 21:38 +0300)
committerKalle Olavi Niemitalo <Kalle@Pulska.kon.iki.fi>
Sun, 15 May 2011 11:02:55 +0000 (15 14:02 +0300)
treecc5030786c83228e2328be8b3da2e792e07adc54
parent534bb38c8a1a608b9bbc444199578a42e590bb2a
Recode X11 window title when saving and restoring

gnome-terminal 2.30.2 expects UTF-8 in the "OSC Ps ; Pt BEL" sequence
that sets the window title.  However, XGetWMName typically returns the
title in "STRING" (Latin-1) or "COMPOUND_TEXT" (escape sequences)
encoding.  Recode the title to restore it correctly.  This helps
especially in the fi_FI.UTF-8 locale, where gnome-terminal has "Pääte"
as the default title.

Related to bugs 885 and 336.
(cherry picked from commit d1245c73a8788a1a27e752f5bd36eded85b92a8c)
src/osdep/os2/os2.c
src/osdep/osdep.c
src/osdep/osdep.h
src/terminal/kbd.c