dabo Commit
Revision 7130
Date: 2012-03-30 10:50:48 -0700 (Fri, 30 Mar 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7130

Changed:
U   trunk/dabo/lib/reportWriter.py

Log:
Receiving UnicodeDecodeError with the Euro symbol on Windows. Replacing this 
code block with the common ustr() call seems to fix it.

Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2012-03-29 22:08:03 UTC (rev 7129)
+++ trunk/dabo/lib/reportWriter.py      2012-03-30 17:50:48 UTC (rev 7130)
@@ -1609,21 +1609,9 @@
 
                        if s is None:
                                s = self.NoneDisplay
-                       if isinstance(s, unicode):
-                               pass
-                       elif isinstance(s, str):
-                               try:
-                                       s = unicode(s, "utf-8")
-                               except UnicodeDecodeError:
-                                       try:
-                                               s = unicode(s, self.Encoding)
-                                       except UnicodeDecodeError:
-                                               # s must have already been 
encoded, and the default encoding is ascii.
-                                               pass
-                       else:
-                               s = unicode(s)
-                       func(posx, 0, s)
 
+                       func(posx, 0, ustr(s))
+
                elif objType in ("Frameset", "Memo"):
                        # Frameset is deprecated; Memo is what to use now. Memo 
abstracts away the
                        # Frame/Paragraph hierarchy into one single report 
object.



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to