[Zope-dev] Refer to zope attribute or object in source

kent sin kentsin@yahoo.com
Sat, 27 Jul 2002 20:08:51 -0700 (PDT)


In PropertySheets.py of zope/lib/python/OFS

def xml_escape(v):
   .....
   return unicode(v, "latin-1").encode("utf-8")

Are there anyway to substitute the "latin-1" with an
attribute of the zope site's attribute say:
"zope-charset" which a site maintainer can modify
through the web?

I raise this question because the current-cvs version
of zope is turned into unicode, but all the source
everywhere is assumed that the data input is "latin-1"
but I am very sure that it will not always the case.
Some sites simply don't work in that assumption,
turning many sites using zope stop upgrade or stop
using zope. This will seriously hurt the zope
community. The initial act to make zope understand
unicode is to help zope internationalize, but the
actual effect was not.

I urge the zope developer, the zope coporation as well
as product developers (some products like ieDocument
and worldPilot have "8859-1" specified in their
source) alert on this issue, and take action before it
is too late. 

The best solution I could come up with is to allow
individual site manager to choose its default charset
and allow other site-branch manager to overwrite it
with acquisition, thus the attribute zope-charset will
be used to determine both the "Content-type:
text/plain; charset="<dtml-var zope-charset>" and the
code convertion of Zope like PropertySheets.py



__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com