Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: GTK+ 2.0 client port
Home

[Freeciv-Dev] Re: GTK+ 2.0 client port

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: GTK+ 2.0 client port
From: Michael Stefaniuc <mstefani@xxxxxxxxx>
Date: Wed, 21 Nov 2001 22:24:06 +0100

On Wed, Nov 21, 2001 at 07:40:01PM +0100, Andreas Kemnade wrote:
> Michael Stefaniuc writes:
>  > Doing wrapper functions (the "Layer for Unicode") for the _W funktions 
> that 
>  > do the MultiByteToWideChar/WideCharToMultiByte voodoo magic on the
>  > wchar_t strings and call the native _A functions.
> MultiByteToWideChar converts a string from a codepage which is
> installed/available on a system to wide chars (unicode).
> But there is no utf8 codepage available on win95.
> 
> That's why I think we need libiconv. Then we can convert the utf8
> strings to the codepage windows actually uses. That codepage 
> contains the chars needed to display strings. And we won't need to
> deal with unicode (wide chars). 
Sorry to ask, but what's the point of using unicode than? I thought we
want to use unicode to improve internationalisation. Play the vikings
with something else then iso-8859-{1,15} and you will see that some city
names are broken. Or play a network game, let your adversary use an
"exotic" encoding (eg KOI8-R or EUC-JP), let him rename his cities
using his native encoding and for him the new city name will be
displayed correctly but you will see only something like "¤ï¤¶¤ï¤¶¤³¤Î".
Why not use unicode internaly and display that correctly if you have the
right fonts installed? That would make freeciv a lot nicer.

I would use following encodings for:
- utf8: 
        - in files (savegame, ruleset, nation-files, po)
        - in the communication between server and client
        - for the name_orig strings in different structs (unit_type,
          nation_type etc.)
        - in the server itself
- utf16 or utf32 (the native implementation of wchar_t) in the client

We would need to use the local encoding only when getting string imput from
the user. On older system that don't support displaying of unicode we
would need to transform the output to an 8bit encoding.

bye
        michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@xxxxxxxxx
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart


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