NetBSD-Bugs archive

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

Re: bin/58609: sh(1) ignores interactive locale changes



The following reply was made to PR bin/58609; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/58609: sh(1) ignores interactive locale changes
Date: Fri, 16 Aug 2024 20:20:39 -0000 (UTC)

 gnats-admin%netbsd.org@localhost writes:
 
 >From: Robert Elz <kre%munnari.OZ.AU@localhost>
 >   =7C If you start sh(1) with LC_CTYPE=3DC, when you enter UTF-8 input,
 >   =7C sh(1) will ignore it, as one might expect.
 > 
 > That makes no sense to me at all ... sh(1) really knows close to nothing
 > about locales (though it should know a little more than it does) and does=
 > nothing (except some pattern matching) differently at all based upon what=
 > the locale is set to.
 
 sh calls setlocale(LC_ALL,"") on startup to initialize the locale
 from the environment, libedit then uses the locale set by the application
 (i.e. sh).
 
 It would be helpful, if you could switch the locale for libedit with
 a shell command. Currently you can only change the environment and
 re-exec the shell.
 
 


Home | Main Index | Thread Index | Old Index