projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcd7ba7
)
Add the BE_ENCODING environmental variable to override the default encoding.
author
W. Trevor King
<wking@drexel.edu>
Thu, 8 Sep 2011 20:10:02 +0000
(16:10 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Thu, 8 Sep 2011 20:10:02 +0000
(16:10 -0400)
libbe/util/encoding.py
patch
|
blob
|
history
diff --git
a/libbe/util/encoding.py
b/libbe/util/encoding.py
index 3fde8cb9da7a03fb754d6b466f7f4c0e68dce0a6..77d62fc87997bda2ee36f17aaf18970fc88efcad 100644
(file)
--- 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():
"""