diff options
author | W. Trevor King <wking@drexel.edu> | 2011-09-08 16:10:02 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2011-09-08 16:10:02 -0400 |
commit | 231dc0a3570f74f63b538544bdc805b71f5f6af0 (patch) | |
tree | 64b87cabbdd0e538ee2b631132441c7682526418 | |
parent | bcd7ba792889ab804e8c312535afdfd17474b10f (diff) | |
download | bugseverywhere-231dc0a3570f74f63b538544bdc805b71f5f6af0.tar.gz |
Add the BE_ENCODING environmental variable to override the default encoding.
-rw-r--r-- | libbe/util/encoding.py | 4 |
1 files changed, 3 insertions, 1 deletions
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(): """ |