In trying to use the notebook in spanish, there's something
"broken" with the encoding which prevents using non-ascii characters.
For example, if one changes the title of a worksheet to something with
non-ascii characters, it seems to work at first, but when going back
to the list of worksheets the title will display wrongly.

I've investigated a bit, and the good news is, I think this must be
pretty easy to fix, because is't *just* an issue with encodings. In
fact, the notebook seems to be unicode-safe, except for the html
serving: it's just that firefox *thinks* the html served by the
notebook is in latin-1 encoding (iso-8859-1), but it is in fact in
utf-8 encoding. Manually changing the encoding makes the page render
ok (accents and all look good).

Thus, the fix that is required is the following:

a) add a

Content-Type: text/html; charset=utf-8

header to the HTTP response given by twisted. This is probably the
best and easier to implement --- I just couldn't find where to do it
in the notebook source, but it must be easy for someone familiar with
notebook code.

b) alternatively, add a line

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

to the <head> section of every page served by the notebook. This I
could do by changing templates and search&replace in the notebook
source, etc... I wouldn't be sure to catch all instances, and in
general I think (a) is preferrable.

Gonzalo

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to