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: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: archer at sourceware dot org
- Date: Tue, 4 Nov 2008 11:59:54 -0800
- Subject: Re: Python pretty-printers and non-ASCII strings do not play well together :-(
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1225828797; bh=5dsQ6CSHdhvd8gYzCNu2r+W/RjA=;h=DomainKey-Signature:MIME-Version:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; b=AaPfGW+k50C6TYq0yJ4+AWb1tb/57bnaD1Hg1VogTdNrvW9qFroaQSymgkxrfMxkmMBLv630Snhoofe44eB0lg==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=mime-version:in-reply-to:references:date:message-id:subject:from:to:cc:content-type:content-transfer-encoding;b=Qomy9/VUi6OgZYLI6UDAPPwa7lFcYyQOZotyxQo/2FtOwBbb/M0JOmJz5dm4jkxoPlXizfFl81KakdAFd3fgLA==
- References: <20081104192834.32F4D3A6B0B@localhost> <m3fxm7nuoo.fsf@fleche.redhat.com>
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