[Haskell-cafe] invalid character encoding
k.schupke at imperial.ac.uk
Sun Mar 20 07:59:52 EST 2005
One thing I don't like about this automatic conversion is that it is
hidden magic - and could catch people out. Let's say I don't want to use
it... How can I do the following
(ie what are the new API calls):
Open a file with a name that is invalid in the current locale (say a
zip disc from a computer with a different locale setting).
Open a file with contents in an unknown encoding.
What are the new binary API calls for file IO?
What type is returned from 'getChar' on a binary file. Should it
even be called getChar? what about getWord8 (getWord16, getWord32 etc...)
Does the encoding translation occur just on the filename or the
contents as well? What if I have an encoded filename with binary
contents and vice-versa.
(I guess I now have to rewrite a lot of file IO code!)
More information about the Haskell-Cafe