Re: Command line arguments depend on locale

2013-02-03 Thread Kevin Kofler
Richard W.M. Jones wrote: > You should *always* set LC_ALL=C when running an external command from > another program (and most probably from a shell script too). I think LC_NUMERIC is probably what's wanted in this case, not LC_ALL. Still, command-line arguments depending on LC_NUMERIC (or worse,

Re: Command line arguments depend on locale

2013-01-31 Thread Benny Amorsen
Matthias Clasen writes: > Until you put a pipe between and turn the outputs of command a into > inputs of command b... People will generally be aware that output is locale-dependent. That is most of the point of having locales at all. Setting LC_ALL=C is not a nice option. That would mean that

Re: Command line arguments depend on locale

2013-01-31 Thread Pádraig Brady
On 01/31/2013 06:01 PM, Matthias Clasen wrote: - Original Message Right, output should be locale specific. Input command line args... seems specious. Until you put a pipe between and turn the outputs of command a into inputs of command b... It's a fair point. I.E. I/O doesn't ro

Re: Command line arguments depend on locale

2013-01-31 Thread Bill Nottingham
Matthias Clasen (mcla...@redhat.com) said: > - Original Message > > > > Right, output should be locale specific. Input command line args... > > seems > > specious. > > Until you put a pipe between and turn the outputs of command a into inputs of > command b... But, as said earlier, it

Re: Command line arguments depend on locale

2013-01-31 Thread Pádraig Brady
On 01/30/2013 11:05 PM, Benny Amorsen wrote: Apparently ping has now started interpreting its command line arguments depending on locale. I.e. ping -i 0.1 no longer works in locales where comma is the decimal separator. This makes it difficult to call system commands. The only workaround is to s

Re: Command line arguments depend on locale

2013-01-31 Thread Matthias Clasen
- Original Message > > Right, output should be locale specific. Input command line args... > seems > specious. Until you put a pipe between and turn the outputs of command a into inputs of command b... -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/

Re: Command line arguments depend on locale

2013-01-31 Thread Matthew Miller
On Thu, Jan 31, 2013 at 11:43:44AM -0500, Bill Nottingham wrote: > > C locale and not do locale dependent parsing. It would be much more > > robust and if you are good enough to use the -i switch you probably know > > how to type 0.1 instead of 0,1 (or whatever format is in your locale) as > > well

Re: Command line arguments depend on locale

2013-01-31 Thread Bill Nottingham
Simo Sorce (s...@redhat.com) said: > > You should *always* set LC_ALL=C when running an external command from > > another program (and most probably from a shell script too). > > Except when you shouldn't ... > > If you are getting arguments that are locale dependent changing the > locale will d

Re: Command line arguments depend on locale

2013-01-31 Thread Simo Sorce
On Thu, 2013-01-31 at 09:07 +, Richard W.M. Jones wrote: > On Thu, Jan 31, 2013 at 12:05:16AM +0100, Benny Amorsen wrote: > > This makes it difficult to call system commands. The only workaround is > > to set LC_ALL to a known-good locale, but then your users get no benefit > > from the transla

Re: Command line arguments depend on locale

2013-01-31 Thread Ian Malone
On 31 January 2013 15:04, Ian Malone wrote: > On 31 January 2013 09:07, Richard W.M. Jones wrote: >> On Thu, Jan 31, 2013 at 12:05:16AM +0100, Benny Amorsen wrote: >>> This makes it difficult to call system commands. The only workaround is >>> to set LC_ALL to a known-good locale, but then your u

Re: Command line arguments depend on locale

2013-01-31 Thread Ian Malone
On 31 January 2013 09:07, Richard W.M. Jones wrote: > On Thu, Jan 31, 2013 at 12:05:16AM +0100, Benny Amorsen wrote: >> This makes it difficult to call system commands. The only workaround is >> to set LC_ALL to a known-good locale, but then your users get no benefit >> from the translations of er

Re: Command line arguments depend on locale

2013-01-31 Thread Richard W.M. Jones
On Thu, Jan 31, 2013 at 12:05:16AM +0100, Benny Amorsen wrote: > This makes it difficult to call system commands. The only workaround is > to set LC_ALL to a known-good locale, but then your users get no benefit > from the translations of error messages and so on. You should *always* set LC_ALL=C

Re: Command line arguments depend on locale

2013-01-31 Thread Petr Pisar
On 2013-01-30, Benny Amorsen wrote: > Apparently ping has now started interpreting its command line arguments > depending on locale. I.e. ping -i 0.1 no longer works in locales where > comma is the decimal separator. > > This makes it difficult to call system commands. The only workaround is > to