[rrd-users] rrdtool graph LINE1 and character sets
peterjuuls at yahoo.es
Tue Sep 22 13:40:02 CEST 2009
This question apparently is not answered in the rrdtool website or FAQ or Wiki...
I downloaded the rrdtool 1.2.30 binaries for Windows 32. I invoked "rrdtool graph" from a script created with the gvim editor using the default character set for command prompt bat-files, ie. encoding=cp1252 (alias for latin1 and iso8859-1). Non-american letters in the script looks okay in gvim, in Notepad, in WordPad, and in UltraEdit. But rrdtool translates the non-american characters into squares in the png-picture-file, ie. as unknown characters. Same thing happens with scripts created in gvim with encoding=cp850 and encoding=utf-8. The native default unicode character set in Windows, utf-16le, used by a large number of Windows OS programs like Notepad, RegEdit etc., always uses at least two bytes to represent a character, and scripts in this character set won't execute at all from the command prompt.
I tried rrdtool with --font DEFAULT:8:c:/windows/fonts/lucon.ttf and arial.ttf and couri.ttf and verdana.ttf, but all fonts return squares in the png file.
Q: What's the trick to have rrdtool handle non-american characters?
More information about the rrd-users