From 231dc0a3570f74f63b538544bdc805b71f5f6af0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 8 Sep 2011 16:10:02 -0400 Subject: [PATCH] Add the BE_ENCODING environmental variable to override the default encoding. --- libbe/util/encoding.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libbe/util/encoding.py b/libbe/util/encoding.py index 3fde8cb..77d62fc 100644 --- a/libbe/util/encoding.py +++ b/libbe/util/encoding.py @@ -23,6 +23,7 @@ Support input/output/filesystem encodings (e.g. UTF-8). import codecs import locale +import os import sys import types @@ -31,7 +32,8 @@ if libbe.TESTING == True: import doctest -ENCODING = None # override get_encoding() output by setting this +ENCODING = os.environ.get('BE_ENCODING', None) +"override get_encoding() output" def get_encoding(): """ -- 2.26.2