From ef57ff352250c68c86d449fed426e825408ba916 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 18 Jul 2009 09:31:44 -0400 Subject: Hardcoded UTF-8 encoding in be-handle-mail. When run by procmail, the encoding returned by libbe.encoding.get_encoding is ANSI_X3.4-1968, which chokes on unicode output. I can't think of a more elegant solution than hardcoding in the default encoding. --- interfaces/email/interactive/be-handle-mail | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index d8aafb2..e8de7ca 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -46,7 +46,8 @@ _THIS_DIR = os.path.abspath(os.path.dirname(__file__)) BE_DIR = _THIS_DIR LOGPATH = os.path.join(_THIS_DIR, "be-handle-mail.log") LOGFILE = None -ENCODING = libbe.encoding.get_encoding() +#ENCODING = libbe.encoding.get_encoding() +ENCODING = "utf-8" ALLOWED_COMMANDS = ["new", "comment", "list", "show", "help"] @@ -232,7 +233,8 @@ def open_logfile(logpath=None): LOGPATH = os.path.join(_THIS_DIR, logpath) if LOGFILE == None and LOGPATH != "none": LOGFILE = codecs.open(LOGPATH, "a+", ENCODING) - + LOGFILE.write("Default encoding: %s\n" % ENCODING) + def close_logfile(): if LOGFILE != None and LOGPATH not in ["stderr", "none"]: LOGFILE.close() -- cgit