This is the mail archive of the
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 <firstname.lastname@example.org> writes:
Paul> UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-3: ordinal not in range(128)
Paul> Not so good :(
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.:
IME the Python C API docs are spotty. I spend a fair amount of time
looking through Google code search :(