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 16:19:19 +0100

Michael Stefaniuc writes:
 > Hello,
 > 
 > i'm not a Windows developer nor user, I got the infos while monitoring
 > the wine-devel mailinglist.
 > 
 > On Wed, Nov 21, 2001 at 03:24:51PM +0100, Andreas Kemnade wrote:
 > > Michael Stefaniuc writes:
 > > 
 > >  > > There is one remaining problem: some nation files include strings in
 > >  > > ISO-8859-1(latin1) encoding. Either we strip them to ASCII form or 
 > > store
 > >  > > them as UTF-8 with the inconvenience this will create in platforms 
 > > without
 > >  > I vote for store them as UTF-8.
 > >  > 
 > >  > > gettext(). How well do Win32 and Amiga cope with UTF-8?
 > >  > Are you kidding? Win32 has a far better Unicode support than Linux,
 > >  > *bsd or what else. I don't know about amiga, but we could link/include
 > >  > libunicode.
 > > How do I print a utf-8 string on win32? I see no support for them.
 > > Unicode: Yes, there are these *W functions, but do they work?
 > > 
 > > I have written a short test program:
 > > #include <windows.h>
 > > #include <assert.h>
 > > int main()
 > > {
 > >   WCHAR name[MAX_PATH+1];
 > >   assert(GetWindowsDirectoryW(name,MAX_PATH)>0);
 > >   MessageBoxW(NULL,name,L"Windows-Directory:",MB_OK);
 > >   return 0;
 > > }
 > > 
 > > The assertion fails on win95. With wine it works. So where is the
 > > unicode support in win32?? 
 > 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.

 > 
 > > 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.
I cannot find its prototype in the windows api headers.
The only conversion function I know is MultiByteToWideChar (which can
convert from unicode).
But I don't see how that can handle UTF-8 on all win32 versions.

Greetings
Andreas Kemnade


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