Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10032) Re: utf8 problems
Home

[Freeciv-Dev] (PR#10032) Re: utf8 problems

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10032) Re: utf8 problems
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Sep 2004 14:43:24 -0700
Reply-to: rt@xxxxxxxxxxx

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

Per Inge Mathisen wrote:
> I run gtk2 client:
> 
>       [perrin@m195h freeciv]$ client/civclient &
>       Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8
> 
>       1: Invalid string conversion from UTF-8 to UTF-8.
> 
>       (civclient:14496): Gtk-CRITICAL **: file gtktextbuffer.c: line 543
>       (gtk_text_buffer_emit_insert): assertion `g_utf8_validate (text, len,
>       NULL)' failed
> 
> This last error message I see all the time.

After much guessing and confusion, we determined that this patch fixes 
it.  But we couldn't quite figure out why.

jason

? diff
? jason-effects-game.diff
? settler_recursion_crash
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.189
diff -u -r1.189 srv_main.c
--- server/srv_main.c   10 Sep 2004 21:20:53 -0000      1.189
+++ server/srv_main.c   10 Sep 2004 21:41:53 -0000
@@ -202,7 +202,7 @@
   has_been_srv_init = TRUE;
 
   /* init character encodings. */
-  init_character_encodings(DEFAULT_DATA_ENCODING);
+  init_character_encodings(FC_DEFAULT_DATA_ENCODING);
 
   /* done */
   return;
Index: utility/fciconv.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/fciconv.c,v
retrieving revision 1.2
diff -u -r1.2 fciconv.c
--- utility/fciconv.c   6 Sep 2004 17:13:07 -0000       1.2
+++ utility/fciconv.c   10 Sep 2004 21:41:53 -0000
@@ -53,7 +53,7 @@
   data_encoding = getenv("FREECIV_DATA_ENCODING");
   if (!data_encoding) {
     /* Currently the rulesets are in latin1 (ISO-8859-1). */
-    data_encoding = DEFAULT_DATA_ENCODING;
+    data_encoding = FC_DEFAULT_DATA_ENCODING;
   }
 
   /* Set the local encoding - first check $FREECIV_LOCAL_ENCODING,
Index: utility/fciconv.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/fciconv.h,v
retrieving revision 1.4
diff -u -r1.4 fciconv.h
--- utility/fciconv.h   9 Sep 2004 18:01:42 -0000       1.4
+++ utility/fciconv.h   10 Sep 2004 21:41:53 -0000
@@ -17,7 +17,7 @@
 
 #include "shared.h"
 
-#define DEFAULT_DATA_ENCODING "UTF-8"
+#define FC_DEFAULT_DATA_ENCODING "UTF-8"
 
 void init_character_encodings(char *internal_encoding);
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10032) Re: utf8 problems, Jason Short <=