Re: WinHugs and Unicode

Neil Mitchell <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Message-ID <404396ef050916085890bd7b2__29075.3215821043$1126886486$gmane$org@mail.gmail.com>
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

_______________________________________________
Cvs-hugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-hugs
unicode.patch (application/octet-stream, 551 B)
Index: src/winhugs/Header.h
===================================================================
RCS file: /cvs/hugs98/src/winhugs/Header.h,v
retrieving revision 1.4
diff -u -r1.4 Header.h
--- src/winhugs/Header.h	8 Sep 2005 16:17:49 -0000	1.4
+++ src/winhugs/Header.h	13 Sep 2005 10:33:11 -0000
@@ -1,7 +1,10 @@
 #define WIN32_MEAN_AND_LEAN
+//#define UNICODE
+//#define _UNICODE
 #include <windows.h>
 #include <richedit.h>
 #include <commctrl.h>
+#include <tchar.h>
 
 // Globally shared variables
 extern HINSTANCE hThisInstance;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.