4Suite / non-ASCII filenames

Thomas Korb Doc at goodweb.de
Sat Oct 12 00:31:41 CEST 2002


Is it possible to pass filenames with non-ASCII characters to 4Suite's
XSLT-Processor without changing the default encoding (ASCII) in Python's
sitecustomize.py?


Background:

I wrote a script (an Editor, some other stuff, 4Suite's XSLT-Processor)
which can (now :-) handle non-ASCII filenames and contents. The only
problem is, that I can't pass a non-ASCII filename to the XSLT-Processor
(via DefaultFactory.fromUri(filename)) without getting the following error:


File "/usr/local/lib/python2.2/site-packages/Ft/Xml/Xslt/Processor.py", 
line 150, in run
XsltException: Source document (/lan/xchange/töst.bf): 
ASCII decoding error: ordinal not in range(128)

(Here, filename was 'töst.bf' encoded as ISO-8859-1.)

Clearly, I could use sitecustomize.py (which I want to avoid since the
script should run on any Python-system).

Is there a way to overcome this problem?

-- 
________________________________________________________________________
Dr. Thomas Korb  /  GOODWEB.DEsign  /  www.goodweb.de  /  Doc at goodweb.de



More information about the Python-list mailing list