summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2012-02-04 14:04:27 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2012-02-04 14:08:54 -0500
commit70cf6bf25b3dec821a4f4f6960f5b94216e064c9 (patch)
tree12e7748c98c0cf94f250efca44a8aa91d7e5f825
parent4fd0cc46dcca81f7fb503cb9e5be340f9366b7c5 (diff)
downloadgit-bz-70cf6bf25b3dec821a4f4f6960f5b94216e064c9.tar.gz
Handle Unicode bug titles correctly
If the data that we are writing into the template ends includes non-ASCII data, it will need to be encoded as UTF-8 before writing the template file. Fix from Luca Bruno. https://bugzilla.gnome.org/show_bug.cgi?id=657716
-rwxr-xr-xgit-bz2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-bz b/git-bz
index d5248e4..754032b 100755
--- a/git-bz
+++ b/git-bz
@@ -729,7 +729,7 @@ def edit_template(template):
handle, filename = tempfile.mkstemp(".txt", "git-bz-")
f = os.fdopen(handle, "w")
- f.write(template)
+ f.write(template.encode("UTF-8"))
f.close()
edit_file(filename)