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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10027) (civclient:12460): Gtk-CRITICAL **: file gtktextbuffer.c: line 548: assertion `g_utf8_validate (text, len, NULL)' failed
From: "Brett Albertson" <brett.albertson@xxxxxxxxxxxx>
Date: Fri, 10 Sep 2004 16:47:22 -0700
Reply-to: rt@xxxxxxxxxxx

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

BTW, apparently the "646" encoding on Solaris is infamous.  It stands 
for ASCII, but isn't recognized by iconv_open().

See this comment from a java patch:

diff -ru gcc-20020325.old/gcc/java/lex.c gcc-20020325/gcc/java/lex.c
--- gcc-20020325.old/gcc/java/lex.c     Sat Mar 23 00:59:20 2002
+++ gcc-20020325/gcc/java/lex.c Wed Mar 27 09:38:10 2002
@@ -290,8 +290,13 @@
       /* If iconv failed, use the internal decoder if the default
         encoding was requested.  This code is used on platforms where
         iconv exists but is insufficient for our needs.  For
-        instance, on Solaris 2.5 iconv cannot handle UTF-8 or UCS-2.  
*/
-      if (strcmp (encoding, DEFAULT_ENCODING))
+        instance, on Solaris 2.5 iconv cannot handle UTF-8 or UCS-2.
+
+        On Solaris the default encoding, as returned by nl_langinfo(),
+        is `646' (aka ASCII), but the Solaris iconv_open() doesn't
+        understand that.  We work around that by pretending
+        `646' to be the same as UTF-8   */
+      if (strcmp (encoding, DEFAULT_ENCODING) && strcmp 
(encoding, "646"))
        enc_error = 1;
 #ifdef HAVE_ICONV
       else


-- 
Brett Albertson
brett.albertson@xxxxxxxxxxxx


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