On Wed, Jan 21, 2009 at 10:19 AM, Petr Rockai <[email protected]> wrote:
>
> Judah Jacobson <[email protected]> writes:
>> Wed Jan 21 09:24:22 PST 2009  Judah Jacobson <[email protected]>
>>   * Resolve issue1292: re-encode line input from the Haskeline backend.
>
> Judah: Thanks for the patch. I have one question though, and that is, how hard
> it is to get working haskeline on Win32? If it amounts to "cabal install
> haskeline" without needing cygwin and the like, I'd like to propose dropping
> the non-haskeline backend for 2.3.

Haskeline can be "cabal install"ed without any prerequisites other
than ghc+cabal.

I'd be in favor of dropping the non-Haskeline backend; although people
using configure+make to build darcs will need to install Haskeline and
its dependencies by hand.

> It would also constitute a first step to stop putting the literal bytes we get
> from terminal into persistent metadata. Even if not a complete solution, it
> would possibly make 99% of newly recorded patches utf8-clean. Step like this
> would of course need to be mentioned in release notes, although I highly doubt
> there are any projects that keep their metadata in pure latin1 or anything. On
> the contrary, I have seen enough repositories with mixed-encoding content,
> which is a nuisance.

Just to be clear, that patch makes askUser behave the same with or
without Haskeline; i.e., it re-encodes user input in whatever the
console is set for (including utf-8, latin1, shift-jis or a windows
code page).  Strings really should be output in the console encoding;
in particular, utf-8 doesn't work with the Windows console(*).

Thus, if darcs stores metadata internally as utf-8 it will need to
re-encode each string before writing it to the terminal.  (Haskeline
exports functionality which can probably help with this issue.)

-Judah

(*) The Win32 console does supposedly support utf-8 (code page 65001),
but I've never been able to get it to work myself; and even if I could
I don't think we can reasonably expect users to make the switch.
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to