[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#833116: fgetty: Incorrect keystroke interpretation



[2018-12-19 10:42] Ricardo Peliquero <zhana@lasampa.com.ar>
> Anton Zinoviev <anton@lml.bas.bg>
> Wed, 5 Dec 2018 21:29:10 +0200:
> 
> > On Wed, Dec 05, 2018 at 08:56:16AM +0000, Dmitry Bogatov wrote:
> 
> > Suppose that we have a working bash shell with UTF-8 console where ñ 
> > displays properly.  Then try this:
> > 
> > LANG=C bash # run a subshell in a non-UTF8 locale
> > 
> > If you press ñ, you will see (arg: 1).  The programs (including a 
> > subshell) also work incorrectly because the locale is not UTF8.
> > 
> 
> Reproduced with expected result (within both login and login1 ttys).

I got idea. No code in fgetty calls setlocale(3), while all tools from
src:shadow use setlocale(LC_ALL, ""). Maybe it could help?

Anton, could you please clarify, how locale is set up by this function
call if process inhereted no locale-related variables.

Maybe it would be better to call setlocale(LANG, "C.UTF-8") in login
process, that execs shell?

> [...]


Reply to: