aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/editor.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-08-03 19:27:00 -0400
committerW. Trevor King <wking@drexel.edu>2009-08-03 19:27:00 -0400
commit3b96373f9ae82deb5b18ab8aae58ab39a0a7764e (patch)
treeea8675afea99d3b87820cffd0c0a9b4df2f7abc4 /libbe/editor.py
parent5aec92f4016ceb29bf502ca15be2f43ca748da76 (diff)
downloadbugseverywhere-3b96373f9ae82deb5b18ab8aae58ab39a0a7764e.tar.gz
Ssupport for UTF-8 in "be comment" calls to EDITOR/VISUAL.
Diffstat (limited to 'libbe/editor.py')
-rw-r--r--libbe/editor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbe/editor.py b/libbe/editor.py
index 93144b8..8f2bdbf 100644
--- a/libbe/editor.py
+++ b/libbe/editor.py
@@ -62,7 +62,8 @@ def editor_string(comment=None, encoding=None):
fhandle, fname = tempfile.mkstemp()
try:
if comment is not None:
- os.write(fhandle, '\n'+comment_string(comment))
+ cstring = u'\n'+comment_string(comment)
+ os.write(fhandle, cstring.encode(encoding))
os.close(fhandle)
oldmtime = os.path.getmtime(fname)
os.system("%s %s" % (editor, fname))