diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-18 09:31:44 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-18 09:31:44 -0400 |
commit | ef57ff352250c68c86d449fed426e825408ba916 (patch) | |
tree | 79b79753c0e2b0bb0a8f5f4149392dc5696a18c1 /interfaces | |
parent | c1a84ab2e9fbdc28fde4ba377e65e9c8e53ee64f (diff) | |
download | bugseverywhere-ef57ff352250c68c86d449fed426e825408ba916.tar.gz |
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.
Diffstat (limited to 'interfaces')
-rwxr-xr-x | interfaces/email/interactive/be-handle-mail | 6 |
1 files changed, 4 insertions, 2 deletions
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() |