
Hi, The new version of WinHugs is not unicode compliant, and is unlikely to be in time for the release. While its relatively easy to change it to be unicode compliant, unfortunately a lot of the useful unicode functions are only available on NT/2k/XP, and some are 98/ME/NT/2K/XP, but not 95. Because of this, its going to be difficult to ensure that a Unicode WinHugs works everywhere, the main problem being testing rather than coding. I may start sending some unicode patches over, so I can get WinHugs building in Unicode mode, since these are ignored when compiling in ANSI mode. The other question is to what degree Hugs in Unicode compliant? Are filenames etc. unicode based, or is it just the interaction? Thanks Neil

On Mon, Sep 12, 2005 at 04:58:22PM +0100, Neil Mitchell wrote:
The new version of WinHugs is not unicode compliant, and is unlikely to be in time for the release. While its relatively easy to change it to be unicode compliant, unfortunately a lot of the useful unicode functions are only available on NT/2k/XP, and some are 98/ME/NT/2K/XP, but not 95. Because of this, its going to be difficult to ensure that a Unicode WinHugs works everywhere, the main problem being testing rather than coding.
I may start sending some unicode patches over, so I can get WinHugs building in Unicode mode, since these are ignored when compiling in ANSI mode.
The other question is to what degree Hugs in Unicode compliant? Are filenames etc. unicode based, or is it just the interaction?
For I/O, filenames, program arguments and environment variables, Haskell programs see only Char, which is supposed to be Unicode, and is under Hugs. Internally, these are converted to/from byte strings as specified by the current locale, and these byte strings are interchanged with the OS. Under the NT family it might be cleaner to translate to UTF-16 and use the W functions, but as you point out these may not be available, even via the emulation layer. It would also mean more code, and in some cases (e.g console output) it might be unmanageable. So perhaps we can live with the double translation for now.

Hi, In Windows both the WinHugs "fake" console and the standard console are already unicode compliant on NT/2K/XP and have wrapper functions such as wprintf which are unicode and tprintf which is either ASCII or Unicode depending on some #define's. How does Hugs deal with unicode, i.e. are the filenames etc. stored by the program as unicode, or is it just the Haskell elements that are Unicode. Attatched is a patch which includes the unicode compliant header along with commented out definitions for unicode in WinHugs. If you uncomment those definitions it will not work, but then I can work on converting files one by one and when they are all done hopefully a Unicode enabled Hugs on windows will result :) This process should not alter the non unicode code paths at all, beause of various defines in Windows. Thanks Neil
participants (2)
-
Neil Mitchell
-
Ross Paterson