Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-utf8 encoding in exceptionhandlers and custom-pages #752

Closed
clausjuhl opened this issue May 4, 2020 · 1 comment
Closed

Non-utf8 encoding in exceptionhandlers and custom-pages #752

clausjuhl opened this issue May 4, 2020 · 1 comment
Labels

Comments

@clausjuhl
Copy link

Hi Simon.

Whenever a response is not piped through a router-view, the template is encoded in latin-1 (I think). This is especially a problem (for me) with the new custom_pages-functionality, but also problematic with the 404- and 500-handlers. Thanks!

@simonw
Copy link
Owner

simonw commented May 4, 2020

Good catch: it looks like we're not specifying the charset for those pages:

$ curl -i 'https://latest.datasette.io/404'
HTTP/1.1 404 Not Found
access-control-allow-origin: *
content-type: text/html
Date: Mon, 04 May 2020 16:23:25 GMT
Server: Google Frontend
Content-Length: 605

<!DOCTYPE html>
<html>
<head>
    <title>Error 404</title>

@simonw simonw added the bug label May 4, 2020
@simonw simonw closed this as completed in 9424687 May 4, 2020
simonw added a commit that referenced this issue May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants