Unicode StructuredText Patch |
![]() |
Created by CodeSyntax . Last modified 2004-02-02 09:21:13. |
StructuredText rendering hasn't worked since Zope 2.6.0 introduced Unicode ustrings. This is a patch valid for ISO8859-1 users. |
StructuredText rendering hasn't worked since Zope 2.6.0 introduced Unicode ustrings. We usually get an AttributeError: meta_type error. Thanks to JDavid we got an answer, at least for former ISO8859-1 users, although you'd have to patch Zope :-( . Could somebody else using a richer encoding confirm if it works in his system? InstructionsJust edit this file: $ZOPE/lib/python/DocumentTemplate/DT_Var.py Line 162: from types import StringType, UnicodeType Line 405: if isinstance(v, StringType) or isinstance(v, UnicodeType): txt = v Restart your Zope, be sure that you configure the right locale setting in your start script and Structured-Text with Unicode strings should be working fine! We usually set our locale this way in the start script: exec /opt/zope/2.6.1b2/bin/python \ /opt/zope/2.6.1b2/z2.py \ -D -L "es_ES.ISO8859-1" "$@" |