WinHugs and Unicode
Ross Paterson
ross at soi.city.ac.uk
Mon Sep 12 18:45:42 EDT 2005
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.
More information about the Cvs-hugs
mailing list