Ethereal-dev: Re: [Ethereal-dev] Windows Unicode build

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 23 Sep 2004 13:05:37 -0700
jscott wrote:
I can make changes to filesystem.c, but first wanted to inquire generally
about building ethereal with MSVC/Unicode.

The answer is, as per my previous message, "we haven't tried it, as far as I know".

Making it handle Unicode file names on Windows *and* handle file names correctly on UN*X would involve deciding whether to use UTF-8 byte strings, or "wide character" strings, on Windows.

We'd then have to worry about Windows OT - Microsoft has "The Microsoft Layer for Unicode on Windows 95/98/Me Systems":

	http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx

to let you run Win32 Unicode apps on Windows OT - but I don't know if it has one of those obnoxious "GPL is evil, burn the GPL" licenses Microsquish have been slapping on some of their code lately.

We'd also have to, I think, use _wfopen() on Windows to open files with Unicode pathnames, and the page at

	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_fopen.2c_._wfopen.asp

seems to hint that, when reading files in text mode, we'd have to take care when reading files that might contain non-ASCII characters.

Coming from a UN*X background, my inclination would be to use UTF-8 as much as possible on Windows - that's the way Unicode is generally handled on UN*X systems - and translate between UTF-8 and Unicode wide characters at the points where Ethereal calls Win32 or MSVC++-library routines. (That'd mean that the filesystem.c functions would take byte strings, not wide character strings, as arguments.)

Right now this is just a research project, to see if it's possible to use
ethereal dissectors in a WP product.  If it is possible, then the lawyers
will figure out what we need to do if we intend to include ethereal in a
released product.

The answer is "either GPL the product or make sure that the product runs 'at arm's length' from Ethereal". The ClearSight people originally linked with Ethereal code and did *NOT* GPL their software - that's not allowed. They currently have a modified version of Ethereal that runs as, I think, an out-of-process COM server, and their non-GPLed application uses COM to control it. ("Out-of-process" is critical - an in-process server counts as linking with Ethereal, and doing that means you have to GPL the application that's linking with it.)