gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch for unicode support on Win32 in GNUstep base


From: Roland Schwingel
Subject: Patch for unicode support on Win32 in GNUstep base
Date: Tue, 03 Aug 2004 10:43:07 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

Hi...

As you know windows is a completely different kind of beast, but thanks to the efforts of all GNUstep developers base runs very well on windows, but unfortunately lacks support of accessing files having unicode filenames or unicode path components. Attached you will
find a patch to add support for this.

We started work on it in GNUstep 1.7.x and it runs very well now for a long time. The supplied
patches are basing on the current CVS.

Here is description of our changes:
To add unicode path support to gnustep we have done two things:
1. Create unicode replacements for all methods using char pathes in method arguments. The name of a unicode replacement method is equal to the char string method with a preceeding 'w'. E.g. the unicode version of fileSystemRepresentationWithPath: is named wfileSystemRepresentationWithPath:
2. Change all methods  which use internally char strings for pathes.

All changes only take effect under windows  (encapsulated using __MINGW__).
When running under __MINGW__ all path related strings are unicode strings!

In NSFileManager.m the GSEnumeratedDirectory struct contains a char string and a DIR variable, which also contains a char string. Under __MINGW__ they are replaced by a unichar and a _WDIR variable. In NSFileManager.h the interface of NSDirectoryEnumerator contains some char string based vars which
had to be changed to unicode.

We tested the changes deeply and also did crosstest on linux to ensure that this will not break anything
on other platforms, even we tried to prevent that in design phase.

Hope you can apply this patch

Roland

Attachment: WIN32Unicode_patches.tar.gz
Description: GNU Zip compressed data


reply via email to

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