[Haskell-cafe] invalid character encoding

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Mar 16 08:16:15 EST 2005


Duncan Coutts <duncan.coutts at worc.ox.ac.uk> writes:

>> It doesn't affect functions added by the hierarchical libraries,
>> i.e. those functions are safe only with the ASCII subset. (There is
>> a vague plan to make Foreign.C.String conform to the FFI spec,
>> which mandates locale-based encoding, and thus would change all
>> those, but it's still up in the air.)
>
> Hmm. I'm not convinced that automatically converting to the current
> locale is the ideal behaviour (it'd certianly break all my programs!).
> Certainly a function for converting into the encoding of the current
> locale would be useful for may users but it's important to be able to
> know the encoding with certainty.

It should only be the default, not the only option. It should be
possible to specify the encoding explicitly.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Haskell-Cafe mailing list