[Haskell-cafe] Re: Unicode workaround for getDirectoryContents under Windows?

Simon Marlow marlowsd at gmail.com
Wed Jun 17 04:01:11 EDT 2009


On 16/06/2009 17:06, Bulat Ziganshin wrote:
> Hello Simon,
>
> Tuesday, June 16, 2009, 7:54:02 PM, you wrote:
>
>> In fact there's not a lot left to convert in System.Directory, as you'll
>> see if you look at the code.  Feel like helping?
>
> these functions used there are ACP-only:
>
> c_stat c_chmod System.Win32.getFullPathName c_SearchPath c_SHGetFolderPath

Yes, except for getFullPathName:

foreign import stdcall unsafe "GetFullPathNameW"
   c_GetFullPathName :: LPCTSTR -> DWORD -> LPTSTR -> Ptr LPTSTR -> IO DWORD

> plus may be some more functions from System.Win32 package - i don't
> looked into it

System.Win32 is using the wide-char APIs exclusively (ok, I haven't 
checked, but I don't know of any System.Win32 functions still using 
narrow strings).

So as you can see, there's not much left to do.  I'll fix openFile.

Cheers,
	Simon


More information about the Haskell-Cafe mailing list