I appreciate the assistance. Setting the LANG variable does the trick. I made the change system-wide by adding the following to /etc/login.conf LC_COLLATE=C charset=UTF-8 lang=en_US.UTF-8
Now the output is correct: >>> b'\xc3\xa2'.decode('utf-8') 'รข' >>> import sys >>> print(sys.stdout.encoding) UTF-8 On Thu, Jan 29, 2015 at 4:53 AM, Konstantin Belousov <kostik...@gmail.com> wrote: > Encoding of the sys.stdout is determined by the language environment. > Set LANG environment variable to something like en_US.UTF-8 to get > UTF-8 output from python. _______________________________________________ freebsd-python@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-python To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"