[rrd-users] FW: Special language dependent characters in rrdtool runnin on Windows
Tobias Oetiker
tobi at oetiker.ch
Thu Aug 23 08:02:15 CEST 2012
Peter,
Today Peter Weischer wrote:
>
> No one any idea regarding how to change the language for the axis
> labels of rrd graphs in a Windows environment?
this does probably depend on the how rrdtool for windows was
compiled ... since windows does not generally contain support for the
strftime function (which is used to do all the time formatting),
rrdtool contains a small public domain version of that function
wich can be compiled in when the OS does not supply an
implementation ... the simple version included with rrdtool only
support english weekday and month names (they are compiled in hard
coded) ...
if your rrdtool is compiled with some posixish layer on windows,
the LANG setitngs should work, but otherwhise there is no helping
it short of modifying the source and recompiling ... (or switching
to some unix system with proper strftime implementation).
cheers
tobi
>
>
>
> From: pweischer at msn.com
> To: rrd-users at lists.oetiker.ch
> Subject: RE: [rrd-users] Special language dependent characters in rrdtool runnin on Windows
> Date: Mon, 20 Aug 2012 15:21:36 +0200
>
>
>
>
> I get the non-ASCII Characters in the graph - by changing the character set of the editor which is used to create the batch files for the rrdgraph command from ANSI to CP850.
>
> But unfortunately I am still not able to chage the language settings for the axis labels. I tried different environment variables (LANGUAGE, LANG, LOCALE) set to different values (DE, de, DE_de, de_DE, de_de) without success. The axis lables are always in english.
>
> Anyone any idea?
>
> Piet
>
>
>
>
>
> From: s.shipway at auckland.ac.nz
> To: pweischer at msn.com; rrd-users at lists.oetiker.ch
> Subject: RE: [rrd-users] Special language dependent characters in rrdtool runnin on Windows
> Date: Sun, 19 Aug 2012 21:38:23 +0000
>
>
>
>
>
>
>
> The axis labels come from the strftime library, which picks the abbreviation according to the Language settings. Set the environment LANG=de (I think) to make it pick German. However, under Windows, it should be picking this up from the internationalisation settings picked in the Windows OS?
>
> To get non-ASCII characters inside the graph is a bit harder, though I believe it is possible under RRDTool 1.3 and later. I?ve not tried this yet, but I think you need to use the ?font option to specify a TrueType font that has the required characters first. EG: --font ?DEFAULT:0:Courier New? will change the default font name for all text to ?Courier New?. See the documentation here http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html
>
> Steve
>
>
>
>
>
> Steve Shipway
> ITS Unix Services Design Lead
> University of Auckland, New Zealand
> Floor 1, 58 Symonds Street, Auckland
> Phone: +64 (0)9 3737599 ext 86487
> DDI: +64 (0)9 924 6487
> Mobile: +64 (0)21 753 189
> Email: s.shipway at auckland.ac.nz
> P Please consider the environment before printing this e-mail
>
>
>
>
>
> From: rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch [mailto:rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of Peter Weischer
> Sent: Monday, 20 August 2012 2:20 a.m.
> To: rrd-users at lists.oetiker.ch
> Subject: [rrd-users] Special language dependent characters in rrdtool runnin on Windows
>
> Hello,
>
> If running rrdtool (1.4.5) in Windows environment, I am not able to enter special German characters (like äöüß etc.) anywhere inside a graph (like in GPRINT, TITLE, COMMENT etc.).
>
> In addition, I would like to configure German labels on the axis like ?Mon,Die, Mit,Don, Fre, Sam, Son? instead of ?Mon, Tue, Wed, Thu, Fri, Sat, Sun?.
> The documentation says, these strings depend on the current locale ? but how can I set the current locale for rrdtool in a Windows environment?
>
> I do not use Perl ? just rrdtool.exe.
>
> Any hint would be very much appreciated!
>
> Piet
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list