UTF-8 library

Axel Simon A.Simon@ukc.ac.uk
Thu, 8 Aug 2002 14:12:18 +0100


On Thu, Aug 08, 2002 at 02:58:42PM +0200, Martin Norbck wrote:
> There rarely should be a need to handle UTF-8 text internally in
> Haskell, but for FFI it would be neccessary. Using locale automatically
> there is wrong, since gtk2 uses UTF-8 always, and other interfaces uses
> iso-8859-1 always. However, having some conversion functions could never
> hurt, but they need not be in the FFI.

Sure it is necessary to explicitly state what kind of conversion you want
when you talk to your C library. So IMHO the only question that really
remains is whether readFile, withCString and all other standard I/O 
function should assume UTF-8 by default or the current locale. I opt for 
the latter.

Axel.