Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#1824) Re: Re: (PR#2743) Blank messages and bad pac
Home

[Freeciv-Dev] Re: (PR#1824) Re: Re: (PR#2743) Blank messages and bad pac

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx, jrg45@xxxxxxxxxxxxxxxxx, Kenn.Munro@xxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#1824) Re: Re: (PR#2743) Blank messages and bad packet strings
From: "Ben Webb via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 12 Jan 2003 10:06:58 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sat, Jan 11, 2003 at 07:55:57PM -0800, Vasco Alexandre Da Silva Costa via RT 
wrote:
> Why don't we just having a Unicode locale a requirement to run Freeciv?
> 
> We'll lose a bit of portability but at least Windows and recent Linux
> versions have it. :-)

Only Windows NT/2000/XP. 95/98/ME don't... (but they do at least have
suitable Unicode stub functions, so it's possible to write a dual-mode
ANSI/Unicode Windows app - at least, I have, with free tools).

> Porting the Xaw, GTK+ 1.2 and Windows clients will be a challenge.

Any system with a Unicode locale would have iconv or similar conversion
libraries, so you can just convert Unicode to something these clients
can understand. Windows shouldn't be any more difficult than the GTK+2.0
client - you just convert to UTF-16 rather than UTF-8. (In my code I use
UTF-8 everywhere, so I don't have to worry about embedded nulls and the
other evils of UTF-16, and just convert to and from UTF-16 when talking
to the Win32 API.)

> Amiga is probably hopeless.

Surely iconv has been ported to the Amiga?

> ... or we just stick with ASCII and use translations of the city names to
> the English names. Suits me fine.

What about a utf8 capability? That would ensure codeset compatibility
between client and server; text strings are simply converted to and from
UTF-8 when they go across the network. (Ideally the server and clients
would use UTF-8 internally anyway, eliminating the need for any
conversion - although a validity check should be used to avoid confusing
libraries like GTK+.) If the capability is not shared, then the server
can just send all data in its own locale's codeset (as is done
currently) and you can hope for the best...

Ruleset files can be either explicitly marked with a codeset (as is done
for .po files) or written in UTF-8.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"I have nothing to do to-day. My practice is never very absorbing."
        - Sir Arthur Conan Doyle



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