git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 21, 2006, 10:33 UTC
Message-ID
<e7b796$lj$1@sea.gmane.org>
In-Reply-To
<11508811631669-git-send-email-jnareb@gmail.com>
Jakub Narebski wrote:
> $ENV{LC_ALL} = 'C'; does not change locale used by strftime.
> Use setlocale( LC_ALL, 'C' ); instead.
Show 5 quoted lines
>  # 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
Previous: Jakub NarebskiNext: Eric Wong
Message 4 of 7 in “Re: [PATCH 1/3] gitweb: whitespace cleanup”
  1. Jakub NarebskiJun 21, 2006
  2. Junio C HamanoJun 21, 2006
  3. send-email: Use setlocale in addition to $ENV{LC_ALL} to set localeJakub Narebski, Jun 21, 2006
  4. Jakub NarebskiJun 21, 2006
  5. Eric WongJun 21, 2006
  6. Jakub NarebskiJun 21, 2006
  7. Junio C HamanoJul 3, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.