[Haskell-cafe] Re: Unicode vs. System.Directory
Hi Arie, If you don't mind binding code. You can try to use GIO APIs from my repository: http://patch-tag.com/r/AndyStewart/gio-branch/home GIO APIs handle unicode filename every well, and cross-platform. Cheers, -- Andy Arie Peterson ar...@xs4all.nl writes: After upgrading to haskell-platform-2010.1.0.0, with the improved unicode support for IO in ghc-6.12, I hoped to be able to deal with filenames containing non-ascii characters. This still seems problematic, though: $ ls m×n♯α $ ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Prelude :m +System.Directory Prelude System.Directory getDirectoryContents . = mapM_ putStrLn .. mÃnâ¯Î± . I hope this passes through the various email systems unharmed; on my terminal, the output of 'ls' contains shiny unicode characters, while 'ghci' garbles up the filename. (My locale is en_GB.utf8.) Similar problems arise with functions such as 'copyFile', which refuses to handle filenames with non-ascii characters (unless wrapping it with encoding functions). Is this a known problem? I searched ghc's trac, but there are no relevant bugs for the component 'libraries/directory'. I have parts of a unicode-aware layer on top of System.Directory laying around somewhere. I was rather hoping to ditch it, but I can polish it and put it on hackage, if people are interested. Kind regards, Arie ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Unicode vs. System.Directory
Hello Andy, Thursday, May 27, 2010, 5:45:27 PM, you wrote: does it work both on linux and windows? i'm very interested to run executables of both kinds and look what features are really supported (i write file/archive manager and it seems that you have solved many problems that drive me crazy, such as displaying icons/filetypes, launching documents...) Hi Arie, If you don't mind binding code. You can try to use GIO APIs from my repository: http://patch-tag.com/r/AndyStewart/gio-branch/home GIO APIs handle unicode filename every well, and cross-platform. Cheers, -- Andy Arie Peterson ar...@xs4all.nl writes: After upgrading to haskell-platform-2010.1.0.0, with the improved unicode support for IO in ghc-6.12, I hoped to be able to deal with filenames containing non-ascii characters. This still seems problematic, though: $ ls m?n?? $ ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Prelude :m +System.Directory Prelude System.Directory getDirectoryContents . = mapM_ putStrLn .. mAna?I± . I hope this passes through the various email systems unharmed; on my terminal, the output of 'ls' contains shiny unicode characters, while 'ghci' garbles up the filename. (My locale is en_GB.utf8.) Similar problems arise with functions such as 'copyFile', which refuses to handle filenames with non-ascii characters (unless wrapping it with encoding functions). Is this a known problem? I searched ghc's trac, but there are no relevant bugs for the component 'libraries/directory'. I have parts of a unicode-aware layer on top of System.Directory laying around somewhere. I was rather hoping to ditch it, but I can polish it and put it on hackage, if people are interested. Kind regards, Arie ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: [Haskell-cafe] Re: Unicode vs. System.Directory
Hello Andy, Friday, May 28, 2010, 1:05:59 AM, you wrote: Looks my file-manager: http://farm5.static.flickr.com/4027/4584389024_782b1e09ee_o.png can you please share windows and linux executables and source code? I have finish all necessary GIO APIs at http://patch-tag.com/r/AndyStewart/gio-branch/home I will try to merge those APIs to next release version of gtk2hs when i have spare time. it seems that i can just merge these sources into my program for a while. but what is the license? believe it or not, but i have commercial project on the march -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[3]: [Haskell-cafe] Re: Unicode vs. System.Directory
Hello Bulat, Friday, May 28, 2010, 9:24:02 AM, you wrote: I have finish all necessary GIO APIs at http://patch-tag.com/r/AndyStewart/gio-branch/home but what is the license? heh, i've found COPYING file. but what you mean? if it's just about one should share all improvements to the library he was made, it's fine for me. but strictly speaking, LGPL also means you should allow user to replace himself GIO library with newer versions, it may be both hard for me and useless for users -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe