Command.encoding_type default should not be 'strict'
Bug #943260 reported by
Martin Packman
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.
* 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.
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: encoding |
tags: | added: check-for-breezy |
To post a comment you must log in.