bug-bash
[Top][All Lists]
Advanced

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

Re: RFE: Please allow unicode ID chars in identifiers


From: Greg Wooledge
Subject: Re: RFE: Please allow unicode ID chars in identifiers
Date: Wed, 14 Jun 2017 08:08:10 -0400
User-agent: Mutt/1.4.2.3i

On Tue, Jun 13, 2017 at 08:06:50PM -0400, Chet Ramey wrote:
> That works with Mac OS X, where the output of locale(1) is a series of
> shell assignment statements with quoted values; your mileage may vary, of
> course.

POSIX <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/locale.html>
defines the format.  LANG is unquoted, and other values are either
quoted or unquoted depending on whether they are explicitly set in the
environment, or derived.

Sounds pretty unsafe to eval, to me.

imadev:~$ locale
LANG=en_US.iso88591
LC_CTYPE="en_US.iso88591"
LC_COLLATE="en_US.iso88591"
LC_MONETARY="en_US.iso88591"
LC_NUMERIC="en_US.iso88591"
LC_TIME=POSIX
LC_MESSAGES="en_US.iso88591"
LC_ALL=
imadev:~$ LC_CTYPE='$(date +%Y%m%d)' locale

Warning! One or more of your selected locales are not available.
Please invoke the commands "locale" and "locale -a" to verify your
selections and the available locales.

Continuing processing using the "C" locale.

LANG=en_US.iso88591
LC_CTYPE=$(date +%Y%m%d)
LC_COLLATE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME=POSIX
LC_MESSAGES="C"
LC_ALL=



reply via email to

[Prev in Thread] Current Thread [Next in Thread]