[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nuxeo-localizer] Unicode and StructuredText
From: |
Garikoitz Araolaza |
Subject: |
[Nuxeo-localizer] Unicode and StructuredText |
Date: |
Mon, 17 Mar 2003 18:05:30 +0100 |
Hi!
I found that since 2.6.0, Zope cannot render Structured Text with Unicode
strings.
There is a collector log about the issue:
http://collector.zope.org/Zope/649
So long I understand (not much, to be true...), we (Latin-1 users) were
very lucky StructuredText users, but now it doesn't work as we moved to
Unicode.
I was surprised that no 8859-1-er pointed out that problem... So I
privately asked to JDavid and he gave me a couple of tricks to solve this
problem:
1- Patching the line 47 in DT_Var.py (Hmmm... I'd say line 405, not
47...) with this code:
if isinstance(v, StringType) or isinstance(v, UnicodeType)
(still untested by me)
2- Creating a filesystem method to be called at the place of
fmt=structured-text so as:
def stx(self, text):
"""
Interprets the text parameter as structured text and returns
the HTML code.
"""
st = StructuredText.ST.Basic(text)
doc = StructuredText.Document(st)
return StructuredText.HTML(doc)
You see... there IS a solution. he problem is that I don't find myself
confortable enough to be able to discuss this in a ZopeDev environment.
Is anybody interested in this isssue or am I (I mean we, at Code&Syntax) alone?
Gari
_______________________________________
Garikoitz Araolaza
Code&Syntax
address@hidden
BIC-Berrilan
Azitaingo Industrialdea
E-20600-EIBAR
Tel: +34 943 82 06 06
- [Nuxeo-localizer] Unicode and StructuredText,
Garikoitz Araolaza <=