--- a/Lib/SimpleHTTPServer.py Wed Mar 16 09:47:15 2011 -0400 +++ b/Lib/SimpleHTTPServer.py Thu Mar 17 00:05:19 2011 +0000 @@ -17,6 +17,7 @@ import cgi import shutil import mimetypes +import sys try: from cStringIO import StringIO except ImportError: @@ -131,7 +132,8 @@ length = f.tell() f.seek(0) self.send_response(200) - self.send_header("Content-type", "text/html") + encoding = sys.getfilesystemencoding() + self.send_header("Content-type", "text/html; charset=%s" % encoding) self.send_header("Content-Length", str(length)) self.end_headers() return f