I recently wrote to rrd-users mailing list, but didn't get any hints how to solve problems, so... Maybe this is correct place:
Upgraded to rrdtool 1.2.11 with hope, that i get my regional letters shown correctly ;-) Got several problems : a) fixed colons in code. This isn't a problem, this is described in "major incompat." list. BUT. I haven't find anywhere mentioned, that variables in 1.2.x can't be only digits. Instead of that, in documentation http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/doc/rrdgraph_data.en.html there is : "Variable names (vname) must be made up strings of the following characters A-Z, a-z, 0-9, -,_ and a maximum length of 255 characters". I have used such variables in 1.0.x version without any problems (shell script that picks users from db, finds rrd and draws graphs, so the easiest way to implement this - start a counter and use it as variable ;-) - but now my scripts stopped working. Take a look : rrdtool graph img.png --start -86400 --imgformat PNG --step 300 DEF:1=db.rrd:Lbig:AVERAGE LINE1:1#61C323:label This works in 1.0.x without problems, but in 1.2.x it draws only empty horiz. line. No warnings, no errors. Just don't work as expected. It seems that it picks "counter value" as data value, and, if graph is drawn in --rigid mode with upper and lower limits set to big values, you just get an line @0. Devs, please, mention this issue somewhere in changelog ;-) It isn't hard to change "DEF:$counter=db.rrd" to "DEF:randomstring${counter}=db.rrd" - but how to know what to change? Or just fix this issue. Or maybe update docs. Thanks. This problem is now solved for me. Another... b) So, now i can change fonts. Good. But how to change encoding? Graph : rrdtool graph test1.png --start -86400 --imgformat PNG --title 'ąčęėįšųūž' --width 1000 --height 900 --step 300 DEF:a=db.rrd:Lbig:AVERAGE LINE1:a#61C323:ąčęėįšųūž --font DEFAULT:11:../fonts/isocpeur.ttf --font-render-mode normal --font TITLE:10:../fonts/verdanab.ttf ...and i get all in iso-8859-1 encoding. With debian package installed (1.2.11-4). Maybe this package is "overpatched"? I took "vanilla" rrdtool 1.2.11 source and build new package. Nothing changes. Build it "standart" way - make, make install into chrooted "clean" environment. The same. At last, rebuild patched package - changed setlocale(LC_CTYPE,""); in rrd_graph.c to setlocale(LC_CTYPE,"lt_LT");. Results are the same. Then i changed locales. Previously i had lt_LT.ISO-8859-13 and lt_LT.UTF-8 compiled in. Now purged all locale data with localepurge, removed /usr/lib/locale/locale-archive and dpkg-reconfigure locales to en_US.utf8, lt_LT.iso-8859-13 and lt_LT.utf-8 only. And set default locale on system to lt_LT.UTF-8 (user locale allways was this, just LANG variable was C, because i don't want translated stuff). Exported all variables, LANG too. Ran rrdtool - no change. Changed text to unicode and ran with LC_ALL=en_US.UTF-8 rrdtool ... - the same. Just got 2 symbols instead of one, so - rrdtool uses the same locale. Tried with different locales, exported or just set before run rrdtool; changed fonts to default, and to "verdana", "arial" - nothing helps. I allways get a text displayed in the same encoding, independent of locale settings, independent from font. "Patched" rrd_graph.c don't help too. As last resort i just straced rrdtool... And didn't find anything interesting. One call to locale-archive, and lots of calls to /etc/localtime. Nothing more with locale. One strange thing - month names are displayed correctly - i mean, not "Jun", but "Sau" (as of "Sausis" instead of "January") - but without lithuanian letters too :/ I saw many graphs with "strange" symbols to me - greek, etc. So, rrdtool can really show this without any problems. Anyone has idea, how to track - that i'm doing wrong? Some info : Debian unstable (and debian stable with rrdtool compiled "by hand" into sandbox too), it really supports mbstowcs (even configure check tells about it), rrdtool 1.2.11. In case of symbols : http://abl.fan.lt/t_lt.png - at left are letters rendered with rrdtool, right side - how they should look (just another spacing, the same font) If something has ideas, how to trace where rrdtool fallbacks to latin1 - please write. What more info i should provide? c) One more bug, but there is one from "can't catch" series - sometimes graphs with --slope-mode and --no-gridfit differs in size from others. I can get graphs, that differs in total size from others only using --slope-mode or --no-grifit, i mean, there are two options, that can trigger this issue. Difference is in total graph size, not only graph (if i draw all graphs with --only-graph option, they allways are the same size). Difference varies in ~10-30 pixels. Can't allways get different size graphs, and can't do minimal testcase for this, so maybe latter i will have more info. Does anybody have seen something like this ? Thanks. And sorry for incorrect english :/ -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-developers WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
