[Scribus] OT: Non-ASCII Chars in Python
Henry Hartley
henryhartley
Tue Oct 5 17:41:38 CEST 2004
>> -----Original Message-----
>> From: scribus-bounces at nashi.altmuehlnet.de
[mailto:scribus-bounces at nashi.altmuehlnet.de] On Behalf Of Dr. Elmar Jobs
>> Sent: Tuesday, October 05, 2004 6:29 AM
>>
>> I tried the calender script recently posted (nice work, thanks)
>> and wanted to change the Month-Names into German. But the Python
>> interpreter bails out with an error.
>>
>> Are there any tricks to use non ASCII characters in python
>> scripts?
I'm not sure how much of the problem is python and how much is
Scribus. Put this into a file and run it at a command prompt:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
MonthList = ['Januar', 'Februar', 'M'+u'\xe4'+'rz']
for Month in range(3):
print MonthList[Month]
It should display the "a" in "Marz" with an umlaut (diaeresis)
over it.
But when run as a Scribus script, the array assignment line is
where it fails. I may be missing something obvious. I haven't
really needed to deal with non-ASCII characters much so I may
be doing something fundamentally wrong.
--
Henry Hartley
Westat RA1356
301-517-8003
More information about the scribus
mailing list