133 |
|
|
134 |
# convert Strings to unicode |
# convert Strings to unicode |
135 |
if type(value) == types.StringType: |
if type(value) == types.StringType: |
136 |
value = value.decode('utf-8') |
value = unicode(value,'utf-8') |
137 |
|
|
138 |
# recode unicode strings to standart encoding |
# recode unicode strings to standart encoding |
139 |
if (type(value) == types.UnicodeType) and \ |
if (type(value) == types.UnicodeType) and \ |
179 |
value=fieldDict[key] |
value=fieldDict[key] |
180 |
if type(value) == types.StringType: |
if type(value) == types.StringType: |
181 |
if not self._dataCon._unicodeMode: |
if not self._dataCon._unicodeMode: |
182 |
fieldDict[key] = value.decode(gConfig('textEncoding')).encode('utf-8') |
fieldDict[key] = unicode(value,gConfig('textEncoding')).encode('utf-8') |
183 |
else: |
else: |
184 |
fieldDict[key] = value.encode('utf-8') |
fieldDict[key] = value.encode('utf-8') |
185 |
|
|