Hi,

On Thu, Aug 28, 2008 at 04:38:31PM +0300, [EMAIL PROTECTED] wrote:
> reassign 495547 munin-node
> found 495547 1.2.6-5
> tags 495547 + patch
> thanks

I suppose this is a typo and you meant #494547 instead. Anyway, you
don't seem to have send that E-mail to [EMAIL PROTECTED] (unless
you Bcc'ed), so there is no harm done ;-)

> Recently (on 20 Aug 2008) I instaled munin(1.2.6-5) and have a lot of
> mails about same issue:
> 
> (process:19739): Pango-WARNING **: Invalid UTF-8 string passed to
> pango_layout_set_text()
> 
> When I look in generated graphics:
> http://localhost/munin/localdomain/localhost.localdomain-acpi-day.png
> 
> There is missing degree sign (°) in front of celsius.
> 
> After openning problematic plugins in emacs and just saving
> (C-x RET f; C-x C-s) them in utf-8 no more mails coming to me and generated
> *.png have proper degree sign in it.
> 
> Hope that will help solving this bug.

Well, this is one way to address that issue but I'm sure that not
everyone is going to like it as probably a lot of scripts would have to
be fixed. The real problem is that rrdtool has to pass an UTF-8-string
to libpango. Now, depending on the locale settings and the encoding of
the script which calls rrdtool, the string that is passed to rrdtool may
use any encoding and rrdtool might not be able to recognize that
correctly.

The approach which is currently used in 1.3.1-3 is to use assume that
the locale settings match the string encoding and convert from the
locale encoding to UTF-8. Now, this assumption might not be true for all
scripts. In that case (and if the conversion fails), rrdtool falls back
to the original encoding of the string and thus triggers that warning
message.

So, in _theory_, whenever that warning appears it indicates some
incorrect setup (given that the above mentioned conversion works
correctly [1]). However, it would imho still be nice if rrdtool could
somehow determine the encoding used for the string and do an appropriate
conversion to UTF-8. Unfortunately, I don't currently have any idea how
that could be done.

Cheers,
Sebastian

[1] That's done by libglib's g_locale_to_utf8() and I would assume
    that's working fine.

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

Attachment: signature.asc
Description: Digital signature

Reply via email to