Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10027) (civclient:12460): Gtk-CRITICAL **: file gt
Home

[Freeciv-Dev] Re: (PR#10027) (civclient:12460): Gtk-CRITICAL **: file gt

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brett.albertson@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10027) (civclient:12460): Gtk-CRITICAL **: file gtktextbuffer.c: line 548: assertion `g_utf8_validate (text, len, NULL)' failed
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Sep 2004 15:15:48 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10027 >

Your local charset is 646?  That's a bit odd.


I don't know how to solve this in the code.  Even when I configure 
without NLS I get the right behavior.  Can you try running as

   FREECIV_LOCAL_ENCODING=ISO-8859-1 civclient

and see if it helps.  Same for the server, probably.  If ISO-8859-1 
doesn't work you could use UTF-8.


Next, let's try to see where the 646 is coming from.  In fciconv.c there 
is code like

#ifdef HAVE_LIBCHARSET
     local_encoding = locale_charset();
#else
#ifdef HAVE_LANGINFO_CODESET
     local_encoding = nl_langinfo(CODESET);
#else
     local_encoding = "";
#endif
#endif

I want to see which of these is returning the string "646".  So change 
it to something like

#ifdef HAVE_LIBCHARSET
     local_encoding = locale_charset();
     printf("Locale_charset returned '%s.'\n", local_encoding);
#else
#ifdef HAVE_LANGINFO_CODESET
     local_encoding = nl_langinfo(CODESET);
     printf("nl_langinfo returned '%s.'\n", local_encoding);
#else
     local_encoding = "";
     printf("Fallback to '%s.'\n", local_encoding);
#endif
#endif

and see what your output is.  Finally look for HAVE_LIBCHARSET and 
HAVE_LANGINFO_CODESET in config.h and see what they say.  We could 
reverse the precedence of these two calls but I don't know of any other 
way to determine the charset.

BTW I get

[jdorje@devon:~/src/freeciv/freeciv]$ LANG=C ./ser
nl_langinfo returned 'ANSI_X3.4-1968.'

jason




[Prev in Thread] Current Thread [Next in Thread]