Index: contrib/workflow/enterprise-workflow.ini
===================================================================
--- contrib/workflow/enterprise-workflow.ini	(revision 10644)
+++ contrib/workflow/enterprise-workflow.ini	(working copy)
@@ -66,7 +66,7 @@
 requestinfo_new.permissions = TICKET_MODIFY
 
 provideinfo_new = infoneeded_new -> new
-provideinfo_new.name = provide info
+provideinfo_new.name = pròvide info
 provideinfo_new.permissions = TICKET_MODIFY
 provideinfo_new.default = 2
 
Index: contrib/workflow/showworkflow
===================================================================
--- contrib/workflow/showworkflow	(revision 10644)
+++ contrib/workflow/showworkflow	(working copy)
@@ -17,7 +17,7 @@
 pdf=`echo "$config" | sed 's/\.ini$/.pdf/g'`
 png=`echo "$config" | sed 's/\.ini$/.png/g'`
 
-$basedir/workflow_parser.py $options "$config" > "$dot"
+$basedir/workflow_parser.py $options "$config" "$dot"
 if [ $? -ne 0 ]; then
     echo "Failed to parse \"$config\", exiting." >&2
     exit 1
@@ -28,6 +28,13 @@
     dot -T png -o "$png" "$dot"
     cmd /c start $png
 else
-    dot -T ps -o "$ps" "$dot" && ps2pdf "$ps" "$pdf" || exit 1
-    kpdf "$pdf"
+    dot -T ps -o "$ps" "$dot"
+    dot -T pdf -o "$pdf" "$dot"
+    # attempt to find a Linux pdf viewer
+    for viewer in kpdf okular evince; do
+        if which $viewer >/dev/null 2>&1; then
+            break
+        fi
+    done
+    $viewer "$pdf"
 fi
Index: contrib/workflow/workflow_parser.py
===================================================================
--- contrib/workflow/workflow_parser.py	(revision 10644)
+++ contrib/workflow/workflow_parser.py	(working copy)
@@ -46,7 +46,7 @@
     """Returns a list of lines to be fed to graphviz."""
     # The size value makes it easier to create a useful printout.
     color_scheme = ColorScheme()
-    digraph_lines = ["""
+    digraph_lines = [u"""
 digraph G {
   center=1
   size="10,8"
@@ -64,13 +64,13 @@
         for oldstate in attributes['oldstates']:
             color = color_scheme.get_color(attributes['name'])
             digraph_lines.append(
-                '  "%s" -> "%s" [label="%s" color=%s fontcolor=%s]' % \
+                u'  "%s" -> "%s" [label="%s" color=%s fontcolor=%s]' % \
                 (oldstate, attributes['newstate'], '\\n'.join(label), color,
                  color))
-    digraph_lines.append('}')
+    digraph_lines.append(u'}')
     return digraph_lines
 
-def main(filename, show_ops=False, show_perms=False):
+def main(filename, output, show_ops=False, show_perms=False):
     # Read in the config
     rawactions = readconfig(filename)
 
@@ -81,10 +81,10 @@
     digraph_lines = actions2graphviz(actions, show_ops, show_perms)
 
     # And output
-    sys.stdout.write('\n'.join(digraph_lines))
+    output.write(unicode.encode(u'\n'.join(digraph_lines), 'UTF8'))
 
 def usage(output):
-    output.write('workflow_parser [options] configfile.ini\n'
+    output.write('workflow_parser [options] configfile.ini [output.dot]\n'
                  '-h --help shows this message\n'
                  '-o --operations include operations in the graph\n'
                  '-p --permissions include permissions in the graph\n'
@@ -114,4 +114,10 @@
         usage(sys.stderr)
         sys.stderr.flush()
         sys.exit(1)
-    main(args[0], show_ops, show_perms)
+    ini_filename = args[0]
+    if len(args) > 1:
+        output = open(args[1], 'w')
+    else:
+        output = sys.stdout
+
+    main(ini_filename, output, show_ops, show_perms)

