[darcs-devel] [patch1605] make DARCS_DONT_ESCAPE_8BIT=1 the default (and 1 more)

Guillaume Hoffmann guillaumh at gmail.com
Thu Oct 26 13:46:00 UTC 2017


Agreed.

Here is my followup patch, that also:
*  removes the comment about backwards compatibility since this fact
is explained in the help string of DARCS_DONT_ESCAPE_ISPRINT
* makes some lines of the help strings fit in less width.

Accepted.

Guillaume


2017-10-12 5:02 GMT-03:00 Ben Franksen <ben.franksen at online.de>:
> Am 11.10.2017 um 21:01 schrieb Guillaume Hoffmann:
>>>> * (less sure about this one) from the help message, it seems we could
>>>> directly remove DARCS_USE_ISPRINT / DARCS_DONT_ESCAPE_ISPRINT ?
>>>
>>> I was thinking about this one, too. I dimly remember that it had uses
>>> for non-unicode locales, such as the ISO latin 8bit encodings. But I may
>>> remember this wrong. In any case, be sure to test with such an encoding
>>> before you throw it away. (I think the important case here are repos
>>> with a long history i.e. with patches that were recorded before unicode
>>> became the standard.)
>>
>> I only found a few references on the Internet to DARCS_USE_ISPRINT /
>> DARCS_DONT_ESCAPE_ISPRINT so we may be doing some damage if we get rid
>> of these variables, but not a lot.
>>
>> From Darcs' code, it looks like enabling one of these variables make
>> Darcs display (without escaping) more characters, since by default, we
>> display characters that are isPrint AND isAscii.
>>
>> Then..  I wonder why shouldn't the default behaviour of Darcs be to
>> show all characters that are isPrint, independently of whether they
>> are isAscii or not?
>
> That would be logical, wouldn't it? But you forget that in the context
> of Darcs.Util.Printer we may not *have* characters but only raw *bytes*,
> depending on whether the Doc contains Strings or ByteStrings. And using
> functions from Data.Char (isPrint, isAscii, ...) on raw bytes i.e.
> encoded text is useless, *unless* you assume an encoding where each
> character is encoded as exactly one byte. This is why I think that
> DARCS_DONT_ESCAPE_ISPRINT only makes sense if your locale encoding is a
> variant of ISO-8859. Patches recorded with such an encoding will then be
> correctly displayed if you set DARCS_DONT_ESCAPE_ISPRINT.
>
> Cheers
> Ben
>
> _______________________________________________
> darcs-devel mailing list
> darcs-devel at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/darcs-devel


More information about the darcs-devel mailing list