aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-01-24 22:45:14 +0200
committerLasse Collin <lasse.collin@tukaani.org>2010-01-24 22:45:14 +0200
commitef68dd4a92976276304de2aedfbe34ae91a86abb (patch)
treeb9bc76257b7e76081d857af2599169ae290b50cf
parentSome improvements to printing sizes in xz. (diff)
downloadxz-ef68dd4a92976276304de2aedfbe34ae91a86abb.tar.xz
Set LC_NUMERIC=C when --robot is used.
It is to ensure that floating point numbers will always have a dot as the decimal separator.
-rw-r--r--src/xz/args.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xz/args.c b/src/xz/args.c
index bb6e27bb..393ba6aa 100644
--- a/src/xz/args.c
+++ b/src/xz/args.c
@@ -222,6 +222,10 @@ parse_real(args_info *args, int argc, char **argv)
// --robot
case OPT_ROBOT:
opt_robot = true;
+
+ // This is to make sure that floating point numbers
+ // always have a dot as decimal separator.
+ setlocale(LC_NUMERIC, "C");
break;
case 'z':