You are here: Foswiki>Tasks Web>Item13406 (19 Jul 2015, GeorgeClark)Edit Attach

Item13406: Directed graph plugin needs fixes for the unicode branch

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: DirectedGraphPlugin
Branches: master
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark
The DirectedGraphPlugin has two errors with the unicode branch.
  1. Foswiki dies with error
  2. doesn't render right the images (in some cases) - probably when the antialias is on.

Patch for the "die" error:
--- /tmp/DirectedGraphPlugin.pm   2015-05-15 22:57:10.000000000 +0200
+++ ./DirectedGraphPlugin.pm   2015-05-15 23:04:05.000000000 +0200
@@ -573,7 +573,7 @@
 # as they are include in $attr.
 
     my $hashCode =
-      md5_hex( 'DOT'
+      md5_hex( map { $Foswiki::UNICODE ? Encode::encode('utf8', $_) : $_ } 'DOT'
           . $desc
           . $attr
           . $antialias
The md5_hex doesn't like wide characters, e.g. when we are unicode -> encode...

Currently not investigated deeply the second error (wrong rendering), after the above patch the DGP successfully renders most of common graphs with unicode characters in the graph <dot> scripts, only some "special" cases are problematic.

-- JozefMojzis - 17 May 2015

 

ItemTemplate edit

Summary Directed graph plugin needs fixes for the unicode branch
ReportedBy JozefMojzis
Codebase trunk
SVN Range
AppliesTo Extension
Component DirectedGraphPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins DirectedGraphPlugin:871bf165959f
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches master
trunkCheckins
masterCheckins DirectedGraphPlugin:871bf165959f
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 19 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy