Changing ZMI to UTF-8

Bug #101085 reported by Guido Goldstein
12
Affects Status Importance Assigned to Milestone
Silva
Fix Released
Low
Unassigned

Bug Description

Idea:
We want to change the ZMI output encoding of everyting in/under a Silva Root to
UTF-8.

Reasons:
 1. help the internationalization
 2. reduces risc of getting Unicode errors :)
 3. reduce code complexity

The change would reduce the probability of getting Unicode errors because in the
code we can assume that all input (SMI *and* ZMI) is in UTF-8, this would also
reduce the code complexity (and therefore the amount of errors).

Technical details:
There is a method to achieve this by setting the attribute 'manage_page_charset'
in the Silva Root to UTF-8. This will display all subsequent pages in this tree
as UTF-8 by default.

Pitfalls:
 1. Existing might contain custom code (python scripts, page templates...) that
contains non-ascii characters which will not display the way they should. Same
 with input from forms.

Obviously the change will result (according to pitfall 1.) in migration issues
for existing sites that use non-ascii characters.

Revision history for this message
Flynt (flyntle) wrote :

Even in regard to migration issues: I think it's worth to make the change to
UTF-8. I'll notify our people, so that they are aware that this change will come up.

Revision history for this message
Clemens Robbenhaar (crobbenhaar) wrote :

I guess this would also help making Silva objects addbale via the ZMI again
(which is not really possible yet, as they tend to get the title
in the wrong encoding).

 Actually e.g. the "Folder.manage_addFolder" assumes to get a "title" argument,
which is a unicode string . This is the case if called via the SMI add from
but not if called via the ZMI. Unfortunately this will not be the case
if the ZMI-encoding is changed either.

 By pure accident this currently works as long as the title only contains
ascii (later on in "set_title" title=title.encode("utf-8") is called,
which does just nothing for a plain ascii string, but bugs for a latin-1
string).
 For the same accidential reason it may work if changing the ZMI charset,
too ...

Revision history for this message
Martijn Faassen (faassen) wrote :

Review this in the 1.1 context; we discussed this for 1.0 but didn't do it in
the end due to some tricky edge cases.

Revision history for this message
Martijn Faassen (faassen) wrote :

Moving this along to silva-future.

Revision history for this message
Andy Altepeter (aaltepet) wrote :

I noticed that in the Silva trunk buildout, the "default-zpublisher-encoding" is UTF-8, so I think this one is resolved.

Changed in silva:
milestone: none → 2.2
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.