Re: [rrd-users] ASCII codes in gprint

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 ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-11-2008
Alex van den Bogaerdt
 
Posts: n/a
Default Re: [rrd-users] ASCII codes in gprint

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0