~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.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:
161
161
        else:
162
162
            encoded_stdout = codecs.getwriter(encoding)(self.stdout,
163
163
                errors=encoding_type)
 
164
            # For whatever reason codecs.getwriter() does not advertise its encoding
 
165
            # it just returns the encoding of the wrapped file, which is completely
 
166
            # bogus. So set the attribute, so we can find the correct encoding later.
 
167
            encoded_stdout.encoding = encoding
164
168
            return TextUIOutputStream(self, encoded_stdout)
165
169
 
166
170
    def note(self, msg):