[BUG] 54173 Output encoding

Richard Wilbur richard.wilbur at gmail.com
Wed Oct 18 04:02:12 BST 2006


John,

You commented on bug 54173 in Launchpad,

"This is because note() et al assume the output encoding is utf8, rather
than actually checking the console encoding.
In general, we need to update so that note() and error() use the right
encoding (mutter only goes to the log file, so utf8 is okay)."

Which note() are you referring to?  I found a list of 'def note('

$ find . -type f | xargs grep 'def note('
./bzrlib/tests/test_selftest.py:    def note(self, msg, *args):
./bzrlib/tests/blackbox/__init__.py:    def note(self, fmt_string,
*args, **kwargs):
./bzrlib/tests/workingtree_implementations/test_commit.py:    def
note(self, fmt_string, *args, **kwargs):
./bzrlib/progress.py:    def note(self, fmt_string, *args, **kwargs):
./bzrlib/progress.py:    def note(self, fmt_string, *args, **kwargs):
./bzrlib/progress.py:    def note(self, *args, **kwargs):
./bzrlib/trace.py:def note(*args, **kwargs):

Whereas, the same search for 'def error('

$ find . -type f | xargs grep 'def error('
./tools/http_client.py:    def error(self, err_info):
./bzrlib/option.py:    def error(self, message):


And when you mention 'note() et al', what are the others?  Is this
specifically console output from commands that we need to properly
encode?  I assume this generally refers only to filesystem entities like
path names and file names since bzr is currently not translated into
other languages.

Do you recommend using bzrlib.osutils.get_user_encoding() as the source
of the proper encoding?

This bug looked interesting and it was unassigned so I took it on.

Thanks,

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


More information about the bazaar mailing list