
14 Mar
2012
14 Mar
'12
11:19 a.m.
Quoth Volker Wysk
I'll report this as a bug in the GHC Trac. But for now, I need to work around the problem somehow. The encoders in GHC.IO.Encoding all work on buffers. How do I recode the command line, in order to get proper Unicode strings?
Data.Text might work for you. I'm not guaranteeing that you'll get a "proper Unicode string" out of this, but you'll get a String with one (LATIN-1) value per character: import qualified Data.ByteString.Char8 as P import Data.Text.Encoding (decodeUtf8) import qualified Data.Text as T let arghs = ["\195\164"] let args = map (T.unpack . decodeUtf8 . P.pack) arghs Donn