[Zope-dev] [Zope-2.6.0b1] Property Problem

Yusei Tahara yusei@domen.cx
Sat, 12 Oct 2002 22:41:50 +0900


Hello.

I have a problem with property tab on zope 2.6 branch,
I can't add/edit properties in japanese.

Because, fixing "latin-1" for unicode decoding in some place.
japanese or other asian language are not latin-1 encoding,
so management_page_charset won't help me.

and Folder title attribute is "string" not "ustring".

if nothing is done, I should make a monkey patch for every zope
update, this is very bad....


Yusei

----------------------------------------------------------------
#ZPublisher/ZConverters.py line:19
def field2string(v):
    if hasattr(v,'read'): return v.read()
    elif isinstance(v,UnicodeType) :
        return v.encode('latin1')     #it cause this problem...
    else:
        return str(v)

#ZPublisher/HTTPRequest.py line:501
if character_encoding:
    # We have a string with a specified character encoding.
    # This gets passed to the converter either as unicode, if it can
    # handle it, or crunched back down to latin-1 if it can not.
    item = unicode(item,character_encoding)
    if hasattr(converter,'convert_unicode'):
        item = converter.convert_unicode(item)
    else:
        item = converter(item.encode('latin1'))
else:
    item=converter(item)


#OFS/dtml/properties.dtml line:250
<input type="text" name="value:utf8:ustring" size="30" />

----------------------------------------------------------------
-- 
Yusei Tahara			"So it goes"
yusei@domen.cx