[Epydoc-commits] SF.net SVN: epydoc: [1328] trunk/epydoc/src/epydoc/docwriter/dotgraph.py
Brought to you by:
edloper
From: <ed...@us...> - 2006-08-29 21:01:50
|
Revision: 1328 Author: edloper Date: 2006-08-29 14:01:43 -0700 (Tue, 29 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1328&view=rev Log Message: ----------- Fixed SF bug [ 1546616 ] Unicode escaped characters. The cmapx returned by dot needed to be decoded (using utf-8, since that's what dot uses for all i/o) before being used. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/dotgraph.py Modified: trunk/epydoc/src/epydoc/docwriter/dotgraph.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2006-08-29 20:32:24 UTC (rev 1327) +++ trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2006-08-29 21:01:43 UTC (rev 1328) @@ -146,7 +146,15 @@ if not self.write(image_file): return '' # failed to render cmapx = self.render('cmapx') or '' - + + # Decode the cmapx (dot uses utf-8) + try: + cmapx = cmapx.decode('utf-8') + except UnicodeDecodeError: + log.debug('%s: unable to decode cmapx from dot; graph will ' + 'not have clickable regions' % image_file) + cmapx = '' + title = plaintext_to_html(self.title or '') caption = plaintext_to_html(self.caption or '') if title or caption: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |