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: Michael Stefaniuc <mstefani@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: GTK+ 2.0 client port
From: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Date: Wed, 21 Nov 2001 19:40:01 +0100

Michael Stefaniuc writes:
 > On Wed, Nov 21, 2001 at 04:19:19PM +0100, Andreas Kemnade wrote:
 > [snip]
 > >  > This is what MSDN says
 > >  > 
 > > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_4k55.asp):
 > >  > Windows 95/98/Me: GetWindowsDirectoryW is supported by the Microsoft
 > >  > Layer for Unicode. To use this, you must add certain files to your
 > >  > application, as outlined in Microsoft Layer for Unicode on Windows
 > >  > 95/98/Me Systems
 > > But I guess the license of that Layer for Unicode is not GPL
 > > compatible...
 > > I have not found the source of it.
 > Hmm... I thought that are only some dlls the user needs to replace.
It's an extra DLL which provides Unicode wrappers and calls the ANSI
functions than. So we need to have the source available.

 > I guess you don't want to maintain a different code base for Win9x and
 > WinNT/2000/XP? We wouldn't need to make our own Layer for Unicode for
 > the funktion we need. It's a stupid work but shouldn't be so
 > problematic.
 > 
 > >  > > But at least we can use libiconv to convert the stuff to the codepage
 > >  > > windows uses or tell gettext to do that automatically. 
 > >  > Why? Windows has it's native function (again from MSDN):
 > >  > STRCONV( ) Function
 > >  > Converts character expressions between single-byte, double-byte,
 > >  > UNICODE, and locale-specific representations.
 > >  > 
 > >  > See
 > >  > 
 > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fox7help/html/lngstrconvlp_rp.asp
 > > 
 > > I think that's a function from Fox and not from the windows api.
 > Duh, i should read more carefully.
 > 
 > > I cannot find its prototype in the windows api headers.
 > > The only conversion function I know is MultiByteToWideChar (which can
 > > convert from unicode).
 > and WideCharToMultiByte to do the conversion in the other direction.
 > 
 > > But I don't see how that can handle UTF-8 on all win32 versions.
 > 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). 

Greetings
Andreas Kemnade



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