[darcs-devel] [issue1693] Check displaying of Unicode patch metadata

Reinier Lamers bugs at darcs.net
Sun Nov 21 16:24:25 UTC 2010


Reinier Lamers <tux_rocker at reinier.de> added the comment:

If we get a fix, yes.

I looked at it for a bit and ultimately what happens is that hPutStr
writes only the lowest 8 bits of a character with a code point > 255. To
solve this, we must either explicitly encode the text with the locale
encoding before hPutStr'ing it, or we require GHC >= 6.12 and don't
switch file handles to binary mode.

The latter solution seems better because it is what the IO library is
designed for. But I don't know which parts of darcs require the file
handles to be in binary mode, and why.

Note that for the Windows line ending behavior that the "binary mode"
flag in C is for, you don't have to put the handle in binary mode in
Haskell. 'hSetNewlineMode noNewlineTranslation' will do that for you and
still write characters outside of latin1 correctly.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1693>
__________________________________


More information about the darcs-devel mailing list