[MERGE] Running bzr from vim scripts gives 'unknown encoding warning'
Neil Martinsen-Burrell
nmb at wartburg.edu
Mon May 5 18:03:37 BST 2008
I'm trying out the Bazaar integration in Vim using VCSCommand and
vcsbzr.vim and I was getting the message
"""
bzr: warning: unknown encoding . Continuing with ascii encoding.
"""
before every command's output. For whatever reason, with Vim 7.0 on Mac
OS X 10.5.2, python was returning '' for locale.getpreferredencoding()
which is not a valid codec, so we got the 'unknown encoding warning'.
For such a non-informative encoding as '', I think we should just assume
(as we do for None and 'cp0') that we should use ascii encoding and not
complain (as the attached patch does).
A more philosophically appealing fix would be to find out what encoding
vim wants and find out why that information isn't being passed on to the
python subprocess and fix that underlying problem. I have chosen an
easier and less satisfying solution.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: encoding-check-change.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080505/6a69542a/attachment-0001.diff
More information about the bazaar
mailing list