Avoid locale issues in rpm2cpio.sh (RhBug:878363)
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 22 Nov 2012 10:22:06 +0000 (12:22 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 22 Nov 2012 10:32:36 +0000 (12:32 +0200)
- In gawk >= 4.0.x printf() "adjusts" things according to current locale,
  but we need the data as it is. Forcing C locale prevents gawk from
  getting funny ideas about character conversions...
(cherry picked from commit c0e95f1cedefd6d7522ef2cf7a2ada7c83821596)

scripts/rpm2cpio.sh

index 57c47bb..cb93ead 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+# Prevent gawk >= 4.0.x from getting funny ideas wrt UTF in printf()
+LANG=C
+
 pkg=$1
 if [ "$pkg" = "" -o ! -e "$pkg" ]; then
     echo "no package supplied" 1>&2