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

add charset header to worksheet html header #5211

Closed
dandrake opened this issue Feb 9, 2009 · 10 comments
Closed

add charset header to worksheet html header #5211

dandrake opened this issue Feb 9, 2009 · 10 comments

Comments

@dandrake
Copy link
Contributor

dandrake commented Feb 9, 2009

Right now, the html generated for a worksheet does not include a header specifying the encoding, which confuses browsers: http://groups.google.com/group/sage-support/t/3d4b400f5afe66fb

As suggested by the OP of that thread, we should add

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

to the worksheet html.

CC: @mwhansen

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/5211

@dandrake
Copy link
Contributor Author

dandrake commented Feb 9, 2009

comment:1

The attached patch (trac_5211.patch) adds Content-Type headers to (I think) all of the pages generated by the notebook server...but it seems like to be sure, we should also get Twisted to add Content-Type headers to its HTTP response. I poked around trying to figure out how to do that, but I don't know enough about that side of things to change it appropriately.

Also, this ticket is closely related to #1477 and #2896.

And here's a W3C page on character encodings: http://www.w3.org/International/O-charset

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Feb 10, 2009

comment:2

This would be nice to get into 3.3 since it causes trouble for IE users.

Dan: Please make sure to mark tickets with patches appropriately so that they get picked up by the right reports.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.4.1, sage-3.3 Feb 10, 2009
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Feb 10, 2009

comment:3

Mike,

it would be nice if you could review this.

Cheers,

Michael

@dandrake
Copy link
Contributor Author

comment:4

Replying to @sagetrac-mabshoff:

This would be nice to get into 3.3 since it causes trouble for IE users.

Dan: Please make sure to mark tickets with patches appropriately so that they get picked up by the right reports.

Okay. I set the milestone to 3.4.1 because I wasn't sure if you were still considering these kinds of tickets for 3.3, and I didn't add a "[with patch, needs review]" because it's not quite done -- we also need to get Twisted to add the correct header, and I don't know how to do that. I was going to ping some of the usual notebook suspects and ask for some help. I see you've already done that. :)

Also, before we charge ahead and merge this, perhaps we should try and find out if anyone uses notebooks not encoded in UTF-8...it seems like we already should be encoding everything UTF-8, but as our continuing problems with accents show, there is some potential for problems to crop up.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Feb 10, 2009

comment:5

Ok, if it isn't ready it should be marked as such. Any ticket with a patch should have the "with patch" marker since there is no way to find tickets with patch otherwise that I am aware of.

It sounds like this ticket will miss the boat in 3.3, but there is another, closely related ticket with patch that needs work at #4547 by Mike, so it seems likely that this will come up again in 3.4 or later. Fixing this once and for all would be nice since it otherwise impedes adopting of Sage in countries where they have funny accents or even dare not to use English at all :)

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.3, sage-3.4.1 Feb 10, 2009
@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title add charset header to worksheet html header [not ready review] add charset header to worksheet html header Feb 10, 2009
@dandrake
Copy link
Contributor Author

comment:6

Ah, #4547 is exactly what I was looking for.

@dandrake
Copy link
Contributor Author

dandrake commented Mar 2, 2009

Attachment: trac_5211.patch.gz

@dandrake
Copy link
Contributor Author

dandrake commented Mar 2, 2009

comment:7

I've attached a new version of the patch, rebased against 3.4.alpha0.

@mwhansen
Copy link
Contributor

comment:8

Since #4547 was what Dan needed, I can give this a positive review.

@mwhansen mwhansen changed the title [not ready review] add charset header to worksheet html header add charset header to worksheet html header Mar 19, 2009
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Mar 23, 2009

comment:9

Merged in Sage 3.4.1.alpha0.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Mar 23, 2009
@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.4.2, sage-3.4.1 Mar 23, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants