Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [rrd-users] ASCII codes in gprint

61 views
Skip to first unread message

Alex van den Bogaerdt

unread,
Mar 11, 2008, 12:41:41 PM3/11/08
to
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-...@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Hans Schulz

unread,
Mar 11, 2008, 2:58:34 PM3/11/08
to
QWxleCwKCnNvcnJ5IEkgY29uZnVzZWQgeW91IDotKSwgeW91IHdlcmUgcmlnaHQgYW55d2F5LgoK
VGhhbmtzIGZvciB5b3VyIHJlc3BvbnNlLiBJIHRyaWVkIHlvdXIgc3VnZ2VzdGlvbiwgZXZlbiBi
ZWZvcmUgcG9zdGluZy4KSW4gbXkgcnJkdG9vbCB2ZXJzaW9uICgxLjAuNDEsIHJ1bm5pbmcgdW5k
ZXIgU3VzZSBMaW51eCBrZXJuZWwgMi4yIG9yCnNvLCBvbiBhbiBvbGQgU3BhcmMgQ2xhc3NpYyBy
ZWNvdmVyZWQgZnJvbSBhIGdhcmJhZ2UgY29udGFpbmVyKSBpdApkb2Vzbid0IHdvcmsuCgpJbiB0
aGUgZ3JhcGgsIHRoZSBjaGFyYWN0ZXIgwrAgaXMgcHJlY2VkZWQgYnkgdXBwZXJjYXNlIEEgd2l0
aCBhIGNhcmV0IG9uCnRvcC4gU2VlIGh0dHA6Ly92ZWdhLmRlbW9uLm5sOjg4ODggLCBncmFwaCB0
aXRsZWQgUHJpbWFyeSBDaXJjdWl0LgoKcmVnYXJkcwpoYW5zCgpfX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fXwpycmQtdXNlcnMgbWFpbGluZyBsaXN0CnJyZC11
c2Vyc0BsaXN0cy5vZXRpa2VyLmNoCmh0dHBzOi8vbGlzdHMub2V0aWtlci5jaC9jZ2ktYmluL2xp
c3RpbmZvL3JyZC11c2Vycwo=
0 new messages