From d8b7ff6a141056770bbddda72b71921775272b1c Mon Sep 17 00:00:00 2001 From: plessbd Date: Sat, 9 May 2015 03:25:07 -0400 Subject: [PATCH] Update Utility http-serve start a SimpleHTTPServer with UTF-8 encoding http://stackoverflow.com/questions/15288891/how-can-i-serve-files-with-utf-8-encoding-using-python-simplehttpserver#24517632 --- modules/utility/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 30fee32a..8fdbaeea 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -158,7 +158,7 @@ fi # Miscellaneous # Serves a directory via HTTP. -alias http-serve='python -m SimpleHTTPServer' +alias http-serve="python -c \"import SimpleHTTPServer; m = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map; m[''] = 'text/plain'; m.update(dict([(k, v + ';charset=UTF-8') for k, v in m.items()])); SimpleHTTPServer.test();\"" # # Functions