Make gen-* scripts LC_ALL=C compatible (#942)

3 files changed