tags:

views:

74

answers:

1

It is possible to convert a string to a TextEncoding using

mkTextEncoding :: String -> IO TextEncoding

Is there any way to do do the reverse? Or, given a TextEncoding, any way to find out any information about that encoding? There doesn't even seem to be an Eq instance for TextEncoding to allow comparing against the defined encodings in System.IO.

Am I missing something, or is there a technical reason why this should not be possible?

+2  A: 

TextEncoding will be a member of the Show class in GHC 7.0.1. See ticket #4273.

Simon Marlow