dabo Commit
Revision 2355
Date: 2006-10-16 07:34:38 -0700 (Mon, 16 Oct 2006)
Author: ed
Changed:
U trunk/dabo/ui/uiwx/dDataControlMixin.py
Log:
Attempt to fix a problem where existing unicode values were being coerced into
unicode strings, throwing a TypeError. I'm not sure if this fix handles every
case; specifically, if the data comes in one encoding and is supposed to be
stored in another, but it should address the immediate problem. If we get
additional reports of errors caused by this change, we'll have to re-think the
solution.
Diff:
Modified: trunk/dabo/ui/uiwx/dDataControlMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dDataControlMixin.py 2006-10-15 22:08:09 UTC (rev
2354)
+++ trunk/dabo/ui/uiwx/dDataControlMixin.py 2006-10-16 14:34:38 UTC (rev
2355)
@@ -41,7 +41,8 @@
if isinstance(oldType, str):
val = str(val)
else:
- val = unicode(val, self.Application.Encoding)
+ if not isinstance(val, unicode):
+ val = unicode(val,
self.Application.Encoding)
elif isinstance(oldval, int) and isinstance(val, basestring):
if val:
val = int(val)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev