Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets
Home

[Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kenn.Munro@xxxxxxxxxxxxxx, jdorje@xxxxxxxxxxxxxxxxxxxxx, jdwheeler42@xxxxxxxxx, jrg45@xxxxxxxxxxxxxxxxx, pawel@xxxxxxxxxxxxxxx, per@xxxxxxxxxxx
Cc: mrproper@xxxxxxxxxx, jlangley@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 26 Apr 2004 22:38:52 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Mon, Apr 26, 2004 at 01:21:50PM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=1824 >
> 
> Jason Short wrote:
> 
> > Note that this is different from what Vasco does now in the conversion 
> > step for gui-gtk-2.0.  He automatically converts strings to and from 
> > (basically) the "network" charset and UTF-8 when the strings are 
> > received from the network.  This works well with the gtk2 client because 
> > UTF-8 can then basically be used everywhere.  It also works because 
> > ascii strings can safely be converted into utf-8 and still used.  It 
> > won't work well for other GUIs with less convenient charsets (like 
> > gui-sdl with a UTF-16 charset).
> 
> OK, this patch does it the way the gtk2 client did it.  This is much 
> easier, leading to a relatively small patch (only 50k :-).
> 
> - The server keeps all text strings in the data encoding.
> - The client keeps all text strings in the display encoding.
> - Text strings are converted by the client's network code.
> 
> - Gettext translates into the internal encoding: the data encoding at 
> the server, the display encoding at the client.
> - fprintf must therefore generally convert from this encoding to the 
> local encoding.  So I write a new function fc_fprintf to do this.  Of 
> course this replaces gui-gtk-2.0's fprintf_utf8.  I didn't replace all 
> fprintf's with this new function, however.
> 
> It's still pretty unpolished, but I believe this design is workable.
> 
> Please test.

Before we start with this can you outline:
 - your solution
 - a graphic with the data stores and flows and its encodings
 - a list of changes to the code

?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Reality? That's where the pizza delivery guy comes from!"




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