This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python pretty-printers and non-ASCII strings do not play well together :-(


On Tue, Nov 4, 2008 at 11:43 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "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.

As an end-user, I would expect something like

  $2 = <"\xef\xcd\xab">

or perhaps the same thing GDB prints without Python:

  $2 = <"ïÍ">

> Paul> What are some of the good Python references?
>    http://www.python.org/doc/2.5.2/api/api.html

Yes, I've seen the above, but it didn't have the answers I was
looking for :(

Thanks,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]