Na xterm
documentação :
The window- and icon-labels can be set or queried using control sequences. As a VT220-emulator, xterm "should" limit the character encoding for the corresponding strings to ISO-8859-1. Indeed, it used to be the case (and was documented) that window titles had to be ISO-8859-1. This is no longer the case. However, there are many appli- cations which still assume that titles are set using ISO-8859-1. So that is the default behavior.
If xterm is running with UTF-8 encoding, it is possible to use window- and icon-labels encoded using UTF-8. That is because the underlying X libraries (and many, but not all) window managers support this feature.
The
utf8Title
X resource setting tells xterm to disable a reconversion of the title string back to ISO-8859-1, allowing the title strings to be interpreted as UTF-8. The same feature can be enabled using the title mode control sequence described in this summary.Separate from the ability to set the titles, xterm provides the ability to query the titles, returning them either in ISO-8859-1 or UTF-8. This choice is available only while xterm is using UTF-8 encoding.
Finally, the characters sent to, or returned by a title control are less constrained than the rest of the control sequences. To make them more manageable (and constrained), for use in shell scripts, xterm has an optional feature which decodes the string from hexadecimal (for setting titles) or for encoding the title into hexadecimal when querying the value.
Então, suas opções são:
-
Envie o título como latin1:
printf '\e]2;%b\a' 'T51l51chargement'
-
Defina o recurso
utf8Title
como true:xterm*utf8Title: true
no seu arquivo de recursos.
-
Use a sequência
\e[>2t
para ativarutf8Title
(e\e[>2T
para desativar):printf '\e[>2t\e]2;%s\a' Téléchargement