Ticket #2525 (new task)

Opened 7 years ago

Last modified 7 years ago

Unicode and page templates

Reported by: gracinet Owned by: gracinet
Priority: P2 Milestone: CPS 3.6.1
Component: CPSCompat Version: 3.5.2
Severity: normal Keywords:


Quoting the  summary I wrote about unicode issues with page templates in Zope 2.10 context:

For now, intermediate page templates relying on the skins system must be entirely written in ascii. They can be fed unicode and return unicode.

In the future, we may force conversion of the template source to unicode. This can be done in CMFCore's FSPageTemplate.py and seems to provide good results on CMF 2.1.1

A few things to take into account :

  • writing ascii only page templates is a bit of a pain in monolingual non english projects
  • a single forgotten non ascii character is fatal, and that will be perceived as a *regression* from Zope 2.9/CPS-3.5. All custom pts will have to be checked.

So, I think we should do this conversion thing, it's much saner. Of course that would not fit general Zope purposes, but we can enforce at the level of CPS that a PT must be UTF-8 encoded.

Of course, thoses PTs that are not will lead to errors, too, but

  • a global transcode of all PTs to from latin1 to utf8 at the time of migration for a given product is really easy to script, and errors can be corrected at this stage.
  • conversion from raw text to unicode would be done close to application startup, we can even voluntary break the startup, so that it's easy to detect leftovers while performing the migration

Question : shall we do this before 3.6.0 or right after ?

Change History

comment:1 Changed 7 years ago by gracinet

  • Component changed from CPS (global) to CPSCompat
  • Milestone changed from CPS 3.6.0 to CPS 3.6.1

We'll do that in 3.6.1 Marking for now for CPSCompat, although it is meant to disappear (see #2488) In the meanwhile, that'll help people not wanting this to avoid it

Note: See TracTickets for help on using tickets.