Re: [PATCH] send-email: Use setlocale in addition to $ENV{LC_ALL} to set locale

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

 



Jakub Narebski wrote:

> $ENV{LC_ALL} = 'C'; does not change locale used by strftime.
> Use setlocale( LC_ALL, 'C' ); instead.

>  # most mail servers generate the Date: header, but not all...
>  $ENV{LC_ALL} = 'C';
> -use POSIX qw/strftime/;
> +use POSIX qw/strftime setlocale LC_ALL/;
> +setlocale( &LC_ALL, 'C' );

Perhaps instead of 
  setlocale( &LC_ALL, 'C' );
we should use
  setlocale( &LC_ALL, '' );
(i.e. set the LC_ALL behaviour according to the locale environment
variables). I'm not that versed in locale, POSIX and Perl.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]