Comment 24 for bug 1134036

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1134036] Re: Failure when using ssh with a locale that is not configured on the server

On Fri, Jun 15, 2018 at 10:16:47PM -0000, Julian Edwards wrote:
> Thanks for addressing this bug at last. It's bitten me so many times
> over the years that I've got used to resetting the locale in remote
> servers in my bashrc. The Perl thing is particularly insidious as it
> outputs to stderr and confuses at least one API that I use.

Inconveniently, the perl case isn't reasonably (IMHO) fixable in the context
of the cloud-init profile.d script. Ubuntu client systems set a healthy
collection of LC_* variables which are then passed over ssh, and 'locale'
will only tell us about a select few of them being invalid - whereas perl
balks if any of them are invalid.

So without either writing a lot of shell code to decipher which variables
are invalid without the help of locale, or Scott's approach of overriding
/all/ environment variables by setting LC_ALL, a complete solution to this
requires support in ssh.