* Julien Cristau <jcristau@debian.org>, 2016-01-28, 14:01:
import subprocess rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,... stderr=subprocess.PIPE).communicate()[0]type(rv)<class 'bytes'>For Python 3, try adding `universal_newlines=True` to any subprocess call. You'll get back a str.Or a UnicodeDecodeError.
Avoid French and Norwegian locales and you're be good. :-POr upgrade to glibc 0.22, which guarantees that "locale -a" output is ASCII-only:
https://sourceware.org/bugzilla/show_bug.cgi?id=18412 -- Jakub Wilk