Issue 1292 Haskeline non-ASCII line input doesn't integrate with darcs.

Title Haskeline non-ASCII line input doesn't integrate with darcs.
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, judah, kowey, thorkilnaur
Assigned To judah

Created on 2008-12-30.06:22:13 by judah, last changed 2009-08-27.14:15:14 by admin.

msg6938 (view) Author: judah Date: 2008-12-30.06:22:09
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:]α
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.
msg7158 (view) Author: judah Date: 2009-01-21.19:50:08
The following patch updated the status of issue1292 to be resolved:

* Resolve issue1292: re-encode line input from the Haskeline backend. 
Ignore-this: e6c94db8cbef0f8fa3f3d0011c6ef88f
This patch bumps dependencies to haskeline-0.6.* (which provides the required
functionality) and terminfo-0.3.* (which is required by that version of
Haskeline).  Haskeline is also enabled by default now that non-ASCII line input
works correctly.
Date User Action Args
2008-12-30 06:22:13judahcreate
2009-01-21 19:50:11judahsetstatus: has-patch -> resolved
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin, judah
messages: + msg7158
2009-08-25 17:37:29adminsetnosy: + darcs-devel, - simon
2009-08-27 14:15:14adminsetnosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin, judah