[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GParser.py
From: |
Arturas Kriukovas |
Subject: |
gnue/common/src GParser.py |
Date: |
Wed, 31 Jul 2002 07:01:28 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 02/07/31 07:01:25
Modified files:
common/src : GParser.py
Log message:
Corrected problem of i18n characters in .gfd file - in case of not
only ascii characters, sax returned unicode string, which caused further
errors in python. Earlier this was solved by changing system-wide
site.py file option defaultencoding from 'ascii' to other value. Now
encoding is read from gnue.conf file option formFontEncoding and is used
to enforce sax returned unicode string recode to given encoding.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GParser.py.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
Patches:
Index: gnue/common/src/GParser.py
diff -c gnue/common/src/GParser.py:1.40 gnue/common/src/GParser.py:1.41
*** gnue/common/src/GParser.py:1.40 Wed Jun 19 16:47:49 2002
--- gnue/common/src/GParser.py Wed Jul 31 07:01:25 2002
***************
*** 213,223 ****
for qattr in saxattrs.keys():
attrns, attr = qattr
!
# Typecasting, anyone? If attribute should be int, make it an int
try:
! attrs[attr] = baseAttrs[attr].get('Typecast',char)(saxattrs[qattr])
# default(baseAttrs[attr],'Typecast',char)(saxattrs[qattr])
loadedxmlattrs[attr] = attrs[attr]
except KeyError:
raise MarkupError, _('Error processing <%s> tag [I do not recognize
the "%s" attribute') % (name, attr)
--- 213,223 ----
for qattr in saxattrs.keys():
attrns, attr = qattr
! encoding = gConfig('formFontEncoding')
# Typecasting, anyone? If attribute should be int, make it an int
try:
! attrs[attr] =
baseAttrs[attr].get('Typecast',char)(saxattrs[qattr].encode(encoding)) #
default(baseAttrs[attr],'Typecast',char)(saxattrs[qattr])
loadedxmlattrs[attr] = attrs[attr]
except KeyError:
raise MarkupError, _('Error processing <%s> tag [I do not recognize
the "%s" attribute') % (name, attr)
- gnue/common/src GParser.py,
Arturas Kriukovas <=