Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100029
| From | "D'Arcy J.M. Cain" <darcy@VybeNetworks.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Unicode failure |
| Date | 2015-12-05 01:08 -0500 |
| Organization | Vybe Networks Inc. |
| Message-ID | <mailman.219.1449295713.14615.python-list@python.org> (permalink) |
| References | <20151204130738.76313c43@imp> <n3t7jo$ae3$1@ger.gmane.org> |
On Fri, 4 Dec 2015 18:28:22 -0500 Terry Reedy <tjreedy@udel.edu> wrote: > On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote: > > I thought that going to Python 3.4 would solve my Unicode issues > > Within Python itself, that should be mostly true. As soon as you > send text to a display, the rules of the display device take over. OK but my display (xterm) can display those characters. I see it when I dump unicode text from my database. > > #! /usr/bin/python3 > > # -*- coding: UTF-8 -*- > > Redundant, as this is the default for 3.x I assumed so but belt and suspenders, right? > Tk widgets, and hence IDLE windows, will print any character from > \u0000 to \uffff without raising, even if the result is blank or . > Higher codepoints fail, but allowing the entire BMP is better than > any Windows codepage. Not sure I follow all this but to be clear, I am not using Tk, Idle or Windows. I guess I should have mentioned that I am on Unix but I thought that the hash-bang would have given that away. To be complete, I am running xterms on Xubuntu connected to NetBSD 7.0. The data is coming from a PostgreSQL 9.3.5 database. I am using a beta of PyGreSQL 5.0 (I am the lead developer for it) and I checked and the type returned is str, not bytes. The database encoding is UTF8. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:darcy@Vex.Net VoIP: sip:darcy@VybeNetworks.com
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Unicode failure "D'Arcy J.M. Cain" <darcy@VybeNetworks.com> - 2015-12-05 01:08 -0500
csiph-web