[Cdd-commits] r833 - cdd/trunk/webtools

CDD Subversion Commit noreply at alioth.debian.org
Wed Jun 18 13:20:45 UTC 2008


Author: tille
Date: Wed Jun 18 13:20:45 2008
New Revision: 833

Modified:
   cdd/trunk/webtools/cddtasktools.py
Log:
Finally really solved the UTF-8 problem.


Modified: cdd/trunk/webtools/cddtasktools.py
==============================================================================
--- cdd/trunk/webtools/cddtasktools.py	(original)
+++ cdd/trunk/webtools/cddtasktools.py	Wed Jun 18 13:20:45 2008
@@ -103,8 +103,10 @@
     # Genshi does not touch strings that are marked with "Markup()"
     # This function does the actual Markup call for any string with error checking
 
+    if string == None:
+        return None
     try:
-        string = Markup(repr(string))
+        string = Markup(unicode(string, 'utf-8'))
     except UnicodeDecodeError, errtxt:
         print >> stderr, "----> %s UnicodeDecodeError in %s (lang='%s'): '%s'; ErrTxt: %s" % \
                                     (elem, pkg, lang, string, errtxt)



More information about the Cdd-commits mailing list