On 09/01/17 09:50, Jim Easterbrook wrote:
>
> I've just tried your template and I'm getting a mangled title, so at
> least I can reproduce your problem. I'll investigate further.
By commenting out lines 740 & 741 in Plot.py I can inspect the temporary
files used to create the plot. The command file is utf8 text and shows
that the correct encoded strings are being passed to gnuplot, so it
appears to be a bug in gnuplot.
According to
http://www.gnuplotting.org/output-terminals/ "It exists
also a png terminal, but it produces uglier output and doesn’t use the
UTF-8 encoding the cairo library does."
I used ISO-8859-1 encoding in the pywws example templates and hadn't
realised that gnuplot's png terminal doesn't accept utf8. There are some
examples that use the 'pngcairo' terminal, including a tweet template.
https://github.com/jim-easterbrook/pywws/blob/master/src/pywws/examples/graph_templates/pngcairo/tweet.png.xml
The 'pngcairo' terminal produces much better looking output than 'png',
so it's worth using if your gnuplot installation has it. The main
difference in the templates is that the <terminal> line is replaced by
<fileformat> and <size> lines.