version-info --include-history UnicodeDecodeError (518609)

Robert Collins robertc at robertcollins.net
Tue Apr 6 05:38:00 BST 2010


On Sat, 2010-04-03 at 00:21 +0100, Martin (gzlist) wrote:
> On 02/04/2010, Parth Malwankar <parth.malwankar at gmail.com> wrote:
> >
> > I noticed that message is unicode and based on irc chat with lifeless
> > I understand that message should not be unicode. Sure enough, the
> > patch below fixes the issue.
> 
> I'd say you have it backwards. The console streamwriter expects to be
> given unicode that it can then coerce to the right terminal encoding,
> but Stanza.to_lines has gone and screwed up the plan by making
> everything UTF-8 already. Changing RioWriter.write_stanza or
> Stanza.write looks like the correct fix to me.

RIO is a low level encoding: it should be outputting RIO (which builds
on utf8), not unicode.

That is to say - if the console were to be in shift-JIS or something,
outputting unicode would *not* result in correct RIO output.

bzr's log is defined as being utf8, so we shouldn't need a replace
statement there.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100406/a1144e9f/attachment.pgp 


More information about the bazaar mailing list