mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
devel/man-to-mdwn.pl: portable locale environment variable setting
Setting locale environment variables (LC_* and LANG) to e.g. en_US.utf8 works fine on Linux, and that is what locale -a returns (in Linux). However this does not work e.g. in some *BSD systems. In these systems, en_US.UTF-8 works. This also works in Linux systems (which may look like a surprising thing on the first sight(*)). But that *UTF-8 format seems to be widely used in the Linux system: Grep it through the files in /etc/, for example. Easy way to test: Run the following command lines. First should complain about setting locale failed, and second should not. $ LC_ALL=en_US.UTF-1 perl -e '' $ LC_ALL=en_US.UTF-8 perl -e '' (*) and who knows what the "standard" is...
This commit is contained in:
parent
4291f32680
commit
1e96445cb5
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ while (my ($k, $v) = each %fhash)
|
|||
|
||||
my @lines;
|
||||
open I, '-|', qw/env -i/, "PATH=$ENV{PATH}",
|
||||
qw/TERM=vt100 LANG=en_US.utf8 LC_ALL=en_US.utf8/,
|
||||
qw/TERM=vt100 LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8/,
|
||||
qw/GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 MANWIDTH=80/,
|
||||
qw/man/, $v or die "$!";
|
||||
binmode I, ':utf8';
|
||||
|
|
Loading…
Reference in a new issue