Re: Unicode Problem

2015-01-29 Thread Roland Smith
On Thu, Jan 29, 2015 at 02:42:31AM -0500, Robert Simmons wrote: > On Thu, Jan 29, 2015 at 2:29 AM, Roland Smith wrote: > > On Thu, Jan 29, 2015 at 01:38:21AM -0500, Robert Simmons wrote: > >> I'm having a unicode problem on FreeBSD lang/python34 that does not >

Re: Unicode Problem

2015-01-29 Thread Rainer Hurling
Am 29.01.2015 um 10:53 schrieb Konstantin Belousov: > On Thu, Jan 29, 2015 at 08:32:35PM +1100, Kubilay Kocak wrote: >> On 29/01/2015 6:13 PM, Robert Simmons wrote: >>> On further inspection I've found the following: >>> >>> FreeBSD >> import sys >> print(sys.getdefaultencoding()) >>> utf-8

Re: Unicode Problem

2015-01-29 Thread Robert Simmons
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) U

Re: Unicode Problem

2015-01-29 Thread Konstantin Belousov
On Thu, Jan 29, 2015 at 08:32:35PM +1100, Kubilay Kocak wrote: > On 29/01/2015 6:13 PM, Robert Simmons wrote: > > On further inspection I've found the following: > > > > FreeBSD > import sys > print(sys.getdefaultencoding()) > > utf-8 > print(sys.stdout.encoding) > > US-ASCII > > >

Re: Unicode Problem

2015-01-29 Thread Kubilay Kocak
On 29/01/2015 6:13 PM, Robert Simmons wrote: > On further inspection I've found the following: > > FreeBSD import sys print(sys.getdefaultencoding()) > utf-8 print(sys.stdout.encoding) > US-ASCII > > MacOS X: import sys print(sys.getdefaultencoding()) > utf-8 print(s

Re: Unicode Problem

2015-01-28 Thread Robert Simmons
ote: >> I'm having a unicode problem on FreeBSD lang/python34 that does not >> appear on MacOS X. I've condensed the problem to one single line to >> enter in the interpreter: >> >> FreeBSD: >> Python 3.4.2 (default, Jan 28 2015, 22:23:57) >> [GCC 4.2

Re: Unicode Problem

2015-01-28 Thread Roland Smith
On Thu, Jan 29, 2015 at 01:38:21AM -0500, Robert Simmons wrote: > I'm having a unicode problem on FreeBSD lang/python34 that does not > appear on MacOS X. I've condensed the problem to one single line to > enter in the interpreter: > > FreeBSD: > Python 3.4.2 (de

Re: Unicode Problem

2015-01-28 Thread Robert Simmons
out.encoding) UTF-8 How do I modify stdout encoding to set it to UTF-8 in FreeBSD? On Thu, Jan 29, 2015 at 1:38 AM, Robert Simmons wrote: > I'm having a unicode problem on FreeBSD lang/python34 that does not > appear on MacOS X. I've condensed the problem to one single line to &g

Unicode Problem

2015-01-28 Thread Robert Simmons
I'm having a unicode problem on FreeBSD lang/python34 that does not appear on MacOS X. I've condensed the problem to one single line to enter in the interpreter: FreeBSD: Python 3.4.2 (default, Jan 28 2015, 22:23:57) [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-fi