test-command-line-encoding 628 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # Choose a UTF-8 locale. The locale doesn't have to be available on the
  3. # system since `environ_locale_charset' does not actually try to set it.
  4. LC_ALL="en_US.UTF-8"
  5. export LC_ALL
  6. unset LANG
  7. unset LC_CTYPE
  8. exec guile -q -s "$0" "λ"
  9. !#
  10. ;; Make sure our first argument is a lower-case lambda.
  11. ;;
  12. ;; Up to Guile 2.0.3 included, command-line arguments would not be converted
  13. ;; according to the locale settings; see
  14. ;; <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00026.html> for
  15. ;; details.
  16. (exit (string=? (cadr (program-arguments)) "λ"))
  17. ;; Local Variables:
  18. ;; mode: scheme
  19. ;; coding: utf-8
  20. ;; End: