author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 4 Aug 2008 20:35:45 +0000 (20:35 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 4 Aug 2008 20:35:45 +0000 (20:35 +0000) | ||
commit | 8bb42b2460b6271011cd902077bbc45eece93127 | |
tree | f980f999a15d9e3c652df51b2f54bba2466d5f24 | tree | snapshot |
parent | 08af50f83e9bfa6401b7ea7bd1b5aa9de97203f7 | commit | diff |
The attached patch converts the given string to UTF-8 using glib's
g_locale_to_utf8() function. This function expects the string to be
encoded as specified by the locale settings, so this will fail if e.g.
you're using some script which is encoded in some way incompatible to
the locale settings. In this case, the patch falls back to use the
original string as provided by the user as there is no way to tell how
to interpret that string. So, in this case, you will still get the old
behavior (that pango warning and messed up strings in the graph).
However, imho this is perfectly fine since it should be up to the user
to take care of a sane environment. -- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1457 a5681a0c-68f1-0310-ab6d-d61299d08faa
g_locale_to_utf8() function. This function expects the string to be
encoded as specified by the locale settings, so this will fail if e.g.
you're using some script which is encoded in some way incompatible to
the locale settings. In this case, the patch falls back to use the
original string as provided by the user as there is no way to tell how
to interpret that string. So, in this case, you will still get the old
behavior (that pango warning and messed up strings in the graph).
However, imho this is perfectly fine since it should be up to the user
to take care of a sane environment. -- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1457 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_gfx.c | diff | blob | history |