[Haskell-cafe] Ready for testing: Unicode support for Handle I/O

Khudyakov Alexey alexey.skladnoy at gmail.com
Sat Feb 7 08:01:57 EST 2009


On Tuesday 03 February 2009 19:42:44 Simon Marlow wrote:
> I've been working on adding proper Unicode support to Handle I/O in GHC,
> and I finally have something that's ready for testing.  I've put a patchset
> here:
>
>    http://www.haskell.org/~simonmar/base-unicode.tar.gz
>
> ... skipped ... 
>
> Comments/discussion please!
>

How do you plan to handle filenames? Currently FilePath is simply a string. 
Would it be decoded/encoded automatically? If so there is a nasty catch. Not 
all valid filenames have representation as strings. On linux (and I suspect 
all unices) file name is sequence of bytes. 

For example let consider file with name {0xff} on computer with UTF8 locale. 
It's valid and everything, but its name cannot be converted to string. 0xff 
byte cannot appear in UTF8 strings. 

--
  Khudyakov Alexey


More information about the Haskell-Cafe mailing list