On Mon, Feb 2, 2015 at 7:17 AM, Skip Montanaro <skip.montan...@gmail.com> wrote: > Thank you. I always thought these Unicode encodings were supposed to > be case-insensitive.
I'd have thought so, too. Try the other variations: include the hyphen but don't capitalize, and the other way around. On my system, all four work equally: rosuav@sikorsky:~$ echo $LANG en_AU.UTF-8 rosuav@sikorsky:~$ LANG=en_AU.utf8 python3.5 -c 'import locale; print(locale.getpreferredencoding(False))' UTF-8 rosuav@sikorsky:~$ LANG=en_AU.utf-8 python3.5 -c 'import locale; print(locale.getpreferredencoding(False))' UTF-8 rosuav@sikorsky:~$ LANG=en_AU.UTF8 python3.5 -c 'import locale; print(locale.getpreferredencoding(False))' UTF-8 rosuav@sikorsky:~$ LANG=en_AU.UTF-8 python3.5 -c 'import locale; print(locale.getpreferredencoding(False))' UTF-8 However, and very interestingly, en_US does not: rosuav@sikorsky:~$ LANG=en_US.UTF-8 python3.5 -c 'import locale; print(locale.getpreferredencoding(False))' ANSI_X3.4-1968 Which is probably because I don't have US locales installed. Maybe there's something about exactly what's installed?? ChrisA -- https://mail.python.org/mailman/listinfo/python-list