Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] Re: (PR#14731) Demographics report and localization
Home

[Freeciv-Dev] Re: (PR#14731) Demographics report and localization

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: himasaram@xxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14731) Demographics report and localization
From: "William Allen Simpson" <wsimpson@xxxxxxxxxxxxxxx>
Date: Fri, 2 Dec 2005 09:35:19 -0800
Reply-to: bugs@xxxxxxxxxxx

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

Jason Short wrote:
> ...  The problem is unfixable using conventional
> means because it's a charsets problem.  The server puts the string into
> a fixed-width 18-bytes buffer, which it then sends to the client.  The
> problem, of course, if your string has multi-byte characters (as, in the
> screenshot, you do) then these will take up some of the 18 bytes of the
> buffer and the buffer will show wrongly sized because 18 bytes is not
> the same as 18 characters.
> 
Speaking as an Internet Engineer, that's HORRIBLE.  The kind of thing
that should be fixed before any of the other enhancements that we've
seen lately.  (And I want those enhancements.)


> So, how to fix it?  Well, this patch should do it.  Of course the real
> fix is, as Vasco said, to send the raw data to the client and use the
> GUI to format it.  This problem only shows up because we're trying to do
> something that we shouldn't be doing in the first place.
> 
Please do the REAL fix.

First of all, never use fixed length strings.  Unix left those behind
decades ago.  Trim the output at the client.

Second of all, send the raw text and translate at the client!

-- 
William Allen Simpson
     Key fingerprint =  17 40 5E 67 15 6F 31 26  DD 0D B9 9B 6A 15 2C 32





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