[PATCH] Commit and log commands: strings encodings
Alexander Belchenko
bialix at ukr.net
Thu Nov 24 15:43:19 GMT 2005
Here patch that provide extended support for string encodings used in
commit and log commands. This patch fix 2 bugs.
1) Bug in log commands: bzr use bzrlib.user_encoding instead of
sys.stdout.encoding for encoding messages. As result on russian windows
machine (user_encoding == cp1251, but console encoding and
sys.stdout.encoding == cp866) russian words showed as hieroglyphs.
2) Bug in commit command: bzr not decode message from external editor to
unicode. As result this message stored "as is" with ampersand coding.
This patch provide 2 new global options:
--input-encoding or -i
--output-encoding or -o
Input encoding used for decoding commit message from external editor AND
from file. Note: commit message from command line (-m option) always
decoded to unicode with bzrlib.user_encoding.
Output encoding used for encoding log message.
Ability of customization string encodings is important for inter-program
communications.
Please review my work. This patch lacks of test cases, I know. But test
cases for this is very non-trivial, any hints is very appreciated.
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ci-log-encoding.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051124/8727a900/attachment.diff
More information about the bazaar
mailing list