aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy')
-rwxr-xr-xmitmproxy6
1 files changed, 4 insertions, 2 deletions
diff --git a/mitmproxy b/mitmproxy
index 2d773c02..f8b42444 100755
--- a/mitmproxy
+++ b/mitmproxy
@@ -62,12 +62,14 @@ if __name__ == '__main__':
opts.debug = options.debug
opts.palette = options.palette
- if "utf" not in os.environ.get("LANG", "").lower():
+ spec = ""
+ for i in ["LANG", "LC_CTYPE", "LC_ALL"]:
+ spec += os.environ.get(i, "").lower()
+ if "utf" not in spec:
print >> sys.stderr, "Error: mitmproxy requires a UTF console environment."
print >> sys.stderr, "Set your LANG enviroment variable to something like en_US.UTF-8"
sys.exit(1)
-
m = console.ConsoleMaster(server, opts)
try:
m.run()