Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#10265) GTK/win32 left panel missing some informati
Home

[Freeciv-Dev] Re: (PR#10265) GTK/win32 left panel missing some informati

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: imbaczek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10265) GTK/win32 left panel missing some information
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Mar 2005 11:46:04 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=10265 >

Mateusz Stefek wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=10265 >
> 
>>[jdorje - Tue Mar 08 18:55:36 2005]:
>>
>>I applied the patch to both branches.  Now how can we find a proper fix?
>>
> 
> The fix is easy:
> We should convert thousand separator from local encoding to utf8.
> 
> I suppose that the Microsoft's encoding for Poland has got an
> non-break-space and the default locale uses it in thousand separator.
> (Official thousand separator for Polish is space).
> 
> I won't write a patch, because I can't test it.
> 
> I probably know why it worked when I compiled it myself - I used
> included gettext.

Indeed, this idea had just occurred to me too, and seems so obvious it 
must be right.  Here's a patch.  Of course I can't test it either.

-jason

Index: utility/shared.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/shared.c,v
retrieving revision 1.125
diff -u -r1.125 shared.c
--- utility/shared.c    8 Mar 2005 18:54:45 -0000       1.125
+++ utility/shared.c    8 Mar 2005 19:44:45 -0000
@@ -1255,7 +1255,6 @@
   (void) bindtextdomain(PACKAGE, LOCALEDIR);
   (void) textdomain(PACKAGE);
 
-#ifndef WIN32_NATIVE  /* Some windows locales are buggy */
   /* Don't touch the defaults when LC_NUMERIC == "C".
      This is intended to cater to the common case where:
        1) The user is from North America. ;-)
@@ -1284,11 +1283,10 @@
       memcpy(grouping, lc->grouping, len);
     }
     free(grouping_sep);
-    grouping_sep = mystrdup(lc->thousands_sep);
+    grouping_sep = local_to_internal_string_malloc(lc->thousands_sep);
     grouping_sep_len = strlen(grouping_sep);
   }
 #endif
-#endif
 }
 
 /***************************************************************************

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