[ZCM] [ZC] 1762/ 3 Comment "Restructured Text unicode problem"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Apr 29 17:27:17 EDT 2005


Issue #1762 Update (Comment) "Restructured Text unicode problem"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1762

==============================================================
= Comment - Entry #3 by garanin on Apr 29, 2005 5:27 pm

Details:
1) add ReStructureText Document from ZMI 
2) edit new document: i write russian text UTF-8 (ура)
3) try save document => Error Type: UnicodeEncodeError
Error Value: 'ascii' codec can't encode characters in position 507-509: ordinal not in range(128)




________________________________________
= Comment - Entry #2 by ajung on Apr 29, 2005 6:05 am

Please describe how to provoke a Unicode error.
________________________________________
= Request - Entry #1 by garanin on Apr 22, 2005 5:58 pm

DocumentTemplate/DT_Var/restructured_text not work with unicode :

def restructured_text(v, name='(Unknown name)', md={}):

    from reStructuredText import HTML

    if isinstance(v,StringType): txt = v
    elif aq_base(v).meta_type in ['DTML Document','DTML Method']:
        txt = aq_base(v).read_raw()
    else: txt = str(v) <========================== error for UnicodeType

    return HTML(txt)



==============================================================



More information about the Zope-Collector-Monitor mailing list