Como consertar os acentos na barra superior do xterm?

2

Eu não tenho nenhum problema com sotaque (sou francês) dentro do xterm. No entanto, como você pode ver nesta captura de tela, a barra superior do xterm tem alguns problemas de acentos:

Noentanto,meusistemainstáveldoDebianestánoutf8(entãodeveserbom):

$localeLANG=fr_FR.utf8LANGUAGE=LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME="fr_FR.utf8"
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES="fr_FR.utf8"
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL=

Como posso consertar esse pequeno bug com a barra superior do xterm?

    
por ppr 19.05.2014 / 23:03

2 respostas

1

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:

  1. Envie o título como latin1:

    printf '\e]2;%b\a' 'T51l51chargement'
    
  2. Defina o recurso utf8Title como true:

    xterm*utf8Title: true
    

    no seu arquivo de recursos.

  3. Use a sequência \e[>2t para ativar utf8Title (e \e[>2T para desativar):

    printf '\e[>2t\e]2;%s\a' Téléchargement
    
por 20.05.2014 / 00:32
0

Você definiu xterm*locale: true no seu .Xresources ?

    
por 19.05.2014 / 23:09