Re: your mail
Diego Bote wrote:
> Santiago Vila wrote:
> > Definir LANG=es_MX en el entorno debería ser suficiente. Eso sí,
> > cosas de readline, para que los cambios surtan efecto si estamos
> > usando bash por ejemplo hay que abrir una nueva sesión.
>
> Bueno, acabo de comentar las líneas que descomenté para ver la letra
> ñ y se sigue viendo y pudiendo escribir. Por supuesto en una nueva
> sesión. Sin embargo, en la página del manual de readline dice sobre
> esto:
>
> convert-meta (On)
> If set to On, readline will convert characters with
> the eighth bit set to an ASCII key sequence by
> stripping the eighth bit and prefixing it with an
> escape character (in effect, using escape as the
> meta prefix).
>
> input-meta (Off)
> If set to On, readline will enable eight-bit input
> (that is, it will not clear the eighth bit in the
> characters it reads), regardless of what the termi
> nal claims it can support. The name meta-flag is a
> synonym for this variable.
>
> output-meta (Off)
> If set to On, readline will display characters with
> the eighth bit set directly rather than as a meta-
> prefixed escape sequence.
>
> Así que no me lo acabo de explicar, porque la ñ y las vocales con
> tilde son caracteres con un octavo bit. No?
Efectivamente, pero si no tienes LANG=C no hace falta cambiar nada.
Creo que el siguiente fragmento de código, tomado de nls.c en
readline4, lo explica:
t = setlocale (LC_CTYPE, "");
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
{
_rl_meta_flag = 1;
_rl_convert_meta_chars_to_ascii = 0;
_rl_output_meta_chars = 1;
return (1);
}
Esto sugiere que si no pones LANG=C, entonces el valor predeterminado
de convert-meta es off y ni siquiera hace falta decírselo explícitamente
en /etc/inputrc.
Reply to: