This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: Python pretty-printers and non-ASCII strings do not play well together :-(
- From: Tom Tromey <tromey at redhat dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: archer at sourceware dot org
- Date: Tue, 04 Nov 2008 12:43:35 -0700
- Subject: Re: Python pretty-printers and non-ASCII strings do not play well together :-(
- References: <20081104192834.32F4D3A6B0B@localhost>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-3: ordinal not in range(128)
Paul> Not so good :(
Yeah.
What should happen here, though? The string contains invalid
characters for its declared (via set target-charset) encoding.
Paul> I've attempted to fix this, but my Python-Fu is not yet up to the
Paul> task, and I couldn't find any good referencese on Python/Unicode/C-API.
Paul> What are some of the good Python references?
I've been using info pages that I built from the Python sources -- but
only because I prefer using info when possible.
The same stuff is on python.org, e.g.:
http://www.python.org/doc/2.5.2/ext/contents.html
or
http://www.python.org/doc/2.5.2/api/api.html
IME the Python C API docs are spotty. I spend a fair amount of time
looking through Google code search :(
Tom