[rrd-developers] UTF-8 and pango ... again

Tobias Oetiker tobi at oetiker.ch
Sat Aug 8 14:11:37 CEST 2009


Today Sebastian Harl wrote:

> Hi Tobi,
>
> On Sat, Aug 08, 2009 at 11:33:56AM +0200, Tobias Oetiker wrote:
> > Jul 21 Sebastian Harl wrote:
> > > The following problem has been reported to me:
> > >
> > > When creating graphs covering one year and using something like
> > > LANG=en_US.UTF-8 and LC_TIME="de_DE" in the environment, pango reports
> > > the following warning:
> > >
> > > Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
> >
> > what happens when you set
> >
> > LC_TIME=de_DE.UTF-8
>
> Well, then it works fine - strftime() then generates an UTF-8 encoded
> string which will work no matter which locale has been set.

in that case one solution might be:

 * if LC_TIME is set before calling the formating for the x-axis legend
   - save LANG
   - set LANG=LC_TIME

what do you think ?

cheers
tobi

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list