Command.encoding_type default should not be 'strict'

Bug #943260 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

There are three ways that a bzr command class may elect to do output currently:

* trace.note()
* ui.ui_factory.note()
* self.outf.write()

The last is the only one that isn't robust when asked to output unicode that can't be represented in the encoding of the underlying file. This is because Command supplies a 'strict' error handler when constructing the output stream. Using 'replace' instead avoids UnicodeEncodeError tracebacks but leaves the possibility open of smarter encoding selection in common cases such as when piping the output. Where commands need to output non-textual data that should not be mangled, they should already be using 'exact' instead.

Martin Packman (gz)
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
tags: added: encoding
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.