Skip to content

Instantly share code, notes, and snippets.

@zakandrewking
Created November 15, 2014 03:25
Show Gist options
  • Save zakandrewking/df4c94162ac1cf9657ce to your computer and use it in GitHub Desktop.
Save zakandrewking/df4c94162ac1cf9657ce to your computer and use it in GitHub Desktop.
SimpleHTTPServer for UTF-8
# http://stackoverflow.com/questions/15288891/how-can-i-serve-files-with-utf-8-encoding-using-python-simplehttpserver
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();"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment