Specify `charset=UTF-8` for `text/plain` files

pull/2402/head
Grant Nestor 9 years ago
parent e1d476ae98
commit dcf077c2bf

@ -46,7 +46,9 @@ class FilesHandler(IPythonHandler):
self.set_header('Content-Type', 'application/x-ipynb+json')
else:
cur_mime = mimetypes.guess_type(name)[0]
if cur_mime is not None:
if cur_mime == 'text/plain':
self.set_header('Content-Type', 'text/plain; charset=UTF-8')
elif cur_mime is not None:
self.set_header('Content-Type', cur_mime)
else:
if model['format'] == 'base64':

Loading…
Cancel
Save