[darcs-devel] [issue1292] Haskeline non-ASCII line input doesn't integrate with darcs.
Judah Jacobson
bugs at darcs.net
Tue Dec 30 06:22:13 UTC 2008
New submission from Judah Jacobson <judah.jacobson at gmail.com>:
Non-ASCII line input does not work with the Haskeline backend.
The main issue is that Haskeline processes Unicode input and returns decoded Chars,
but the non-Haskeline backend uses getLine which reads each byte into a separate
Char. Darcs stores strings internally using the latter scheme, since it uses
standard library functions like writeFile, putStr, etc. which ignore all but the
lowest 8 bits of each Char.
For example (with a UTF-8 console):
Prelude> getLine
[user input:]α
"\206\177"
Prelude> :m +System.Console.Haskeline
Prelude System.Console.Haskeline> runInputT defaultSettings $ getInputLine ""
[user input:]α
Just "\945"
Also, Haskeline requires UTF-8 on Unix, which may be unnecessarily restrictive for
systems that use ISO-8859 and other such encodings.
The next release of Haskeline (version 0.6) should provide functionality which will
make these issues easier to resolve.
----------
assignedto: judah
messages: 6938
nosy: dmitry.kurochkin, judah, kowey, simon, thorkilnaur
priority: bug
status: in-progress
title: Haskeline non-ASCII line input doesn't integrate with darcs.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1292>
__________________________________
More information about the darcs-devel
mailing list