[darcs-users] [patch37] Store textual patch metadata encoded in UTF-8

Reinier Lamers tux_rocker at reinier.de
Sun Nov 1 17:55:50 UTC 2009

New submission from Reinier Lamers <tux_rocker at reinier.de>:

Hi all,

Here is the patch that makes darcs store patch name, author and log as UTF-8 encoded strings.

By itself, this has no visible advantage. However, it makes it possible to:

* display non-ASCII patch and author names consistently in different locales
* produce closer-to-valid XML if the --xml-output option is given
* use --match with non-ASCII patch and author names on patches that were
  recorded in another locale

The patches makes darcs differentiate between old-style and UTF-8 patches by
adding an 'Ignore-this: UTF-8' line to the patch log, and looking for that
line when interpreting the patch.

The patches make darcs treat old-style patches as locale-encoded. This may be
controversial. I did this because I suppose that people have already been
using darcs with non-ASCII locales, using its encoding ignorance as a feature.
They may have recorded patches with metadata in UTF-8 or other multibyte
encodings, and it would be sorry for them to start displaying such metadata
interpreted as ASCII or latin-1.

I attached a diff between the starting point and the end result of these
patches, as they contain some hunks that are reverted in later patches.


files: utf8-metadata.diff, utf8-metadata.dpatch
messages: 9163
nosy: tux_rocker
status: needs-review
title: Store textual patch metadata encoded in UTF-8

Darcs bug tracker <bugs at darcs.net>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: utf8-metadata.dpatch
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20091101/117d8b48/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utf8-metadata.diff
Type: text/x-patch
Size: 34386 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20091101/117d8b48/attachment-0001.bin>

More information about the darcs-users mailing list