This is a discussion on Re: [rrd-users] ASCII codes in gprint within the RRD Users forums, part of the Networking and Network Related category; On Mon, Mar 10, 2008 at 06:37:29PM +0100, Hans Schulz wrote: > Hello, > I use rrdtool to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Mon, Mar 10, 2008 at 06:37:29PM +0100, Hans Schulz wrote:
> Hello, > I use rrdtool to plot graphs of temperatures, in degrees Centigrade > (Celsius). The standard symbol for degrees is ASCII 0176 (a sort of > superscript o). I cannot figure out how to get this symbol in my graphs > legend or comment strings. You got me confused for a while! 0176 usually means octal, so I was looking at 0176(8)==0x7E(16)==126(10)==<tilde>. Anyway, you are looking for 176, which is above 126 and thus not ASCII. I type this on my keyboard, which is set to US-international, as follows: press and hold righthand side <alt>, press and hold <shift>, press the key <; and :>. RRDtool displays it just fine here. The resulting character shows up: in a latin1 encoded file: 0xB0 in an UTF8 encoded file: 0xC2 0xB0 This means you could also: echo -en \\xC2\\xB0>degree.utf8 or: echo -en\\xB0>degree.latin1 and then use the resulting file to build your script. HTH -- Alex van den Bogaerdt http://www.vandenbogaerdt.nl/rrdtool/ _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |
![]() |
| Thread Tools | |
| Display Modes | |
|
|