/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Martin Pool
  • Date: 2009-12-08 08:40:11 UTC
  • mto: This revision was merged to the branch mainline in revision 4880.
  • Revision ID: mbp@sourcefrog.net-20091208084011-6l59szwksd30mp7h
Put tweaks to codecs.getwriter encoding into the place it's created

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
            encoding = osutils.get_terminal_encoding()
147
147
        if encoding_type is None:
148
148
            encoding_type = 'replace'
149
 
        # For whatever reason codecs.getwriter() does not advertise its encoding
150
 
        # it just returns the encoding of the wrapped file, which is completely
151
 
        # bogus. So set the attribute, so we can find the correct encoding later.
152
149
        out_stream = self._make_output_stream_explicit(encoding, encoding_type)
153
 
        if not getattr(out_stream, 'encoding', None):
154
 
            out_stream.encoding = encoding
155
150
        return out_stream
156
151
 
157
152
    def _make_output_stream_explicit(self, encoding, encoding_type):