Neil Williams linux at
Tue Mar 15 07:51:52 EST 2005

On Monday 14 March 2005 2:09 pm, Josh Sled wrote:
> On Wed, 2005-03-02 at 05:36, Neil Williams wrote:
> > To me, it seems that we are passing a const char * to
> > pango_layout_set_text() when it is expecting a UTF-8 wchar_t wide char
> > string.
> Actually, I think that's slightly wrong.  pango wants UTF-8 strings,
> which conveniently fit into char* ... since the whole point of UTF-8 was
> to traffic ASCII unmodified and everything else within ASCII [via
> escaped multi-character sequences].
> The wchar_t types are a different, 32-bits-per-character [!] type that I
> believe is UCS-4 encoding.
> I'm almost positive we want UTF-8.


> > Is this a character set issue (i.e. am I the only one seeing this) or
> > should these functions be converting const char to const wchar_t* using
> > the C library before calling pango?
> Hmm.  I'm not sure where this is creeping in.  I'm definitely not seeing
> the warnings, so it may be something on your side or in non-US locale
> [which I should have but didn't check yesterday].

Can you try with LANG=en_GB and see what you get?

When I load gnucash, I get four pango errors. Then when I've got a file 
loaded, I get a series every single time I move the mouse over the account 
icons in the main window.

The only way I clear the errors is if I use:
$ unset LANG
$ export LANG=C
(i.e. if I select a LANG value that isn't supported, it is fine.)

Then every pango error disappears.

What's your LANG value in your environment?

> Do you see the issues on new-file-creation?

$ unset LANG
$ ./gnucash --nofile
no pango errors (just the usual GLib ones).

$ export LANG=en_GB
$ ./gnucash --nofile
gnucash:25918): Pango-WARNING **: Invalid UTF-8 string passed to 
(repeats 4 times - the very last warnings of the --nofile output.)

Before any file is even loaded. Can you reproduce that?

> Can you isolate the source of the strings?

Every single string seems affected - there are so many that I really cannot 
identify them. Every menu action, every mouseover action seems to bring up 
about 6 and they quickly scroll passed to the point that I can't tell even if 
they are new or not.

> Certainly both US and English date strings should be ASCII-only.

Now this is interesting, I exported LANG=C and started GnuCash with --nofile. 
I changed the accounts date format to UK without problem. I changed the new 
account currency and default report currency to GBP without problem. I go to 
Fancy Date Format and merely selecting UK (31/12/2001) brings up 
(gnucash:26026): Pango-WARNING **: Invalid UTF-8 string passed to 

That is the ONLY pango warning on the screen at this point.

Now suddenly, I can see the balances of my accounts in GBP when this has never 
been possible before. (Yes, that's right, up until now I thought that the G2 
port wasn't ready to display account balances in GBP! Sorry!)

I get no further pango errors in usage.

> ...jsled


Neil Williams

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the gnucash-devel mailing list