[darcs-users] UTF-16 (was: Default binary masks)

David Roundy droundy at abridgegame.org
Fri Nov 28 14:14:50 UTC 2003


On Fri, Nov 28, 2003 at 11:41:31AM +0900, Alex Shinn wrote:
> At Thu, 27 Nov 2003 06:49:30 -0500, David Roundy wrote:
> > It seems that replace is safe if your tokens only contain single byte
> > characters, but if you want to include multibyte characters in your tokens,
> > the tokenizing code will split the bytes of a single character, which is
> > definitely not a good thing.  A small extension to the tokenizing code to
> > support [^ \n\t] type specification would make replace work all right with
> > multibyte characters, as long as you specify the token delimiters rather
> > than the valid token characters (or the valid token characters are all
> > single-byte).
> 
> Ah, I'd prefer this style anyway since I program in Scheme which allows
> almost anything in an identifier.

I've just added support for [^ \n\t] sort of delimiter to define tokens.

> It might be nice to be able to record per project the default
> delimiters, whether they are inclusive or exclusive.

Currently this can be done on a per-repository basis using
_darcs/prefs/defaults.  I haven't figured out the best balance for
supporting this sort of preference on a project basis (i.e. so changes to
it will be pulled via a patch).

I could make defaults behave like binary and boring, in that by default it
is determined on a per-repository basis, but allow you to make change which
file is used as the "defaults" file to be a version-controlled file... but
this starts getting a bit scary--allowing patches to change the
command-line parameters to darcs in a not-entirely-user-visible way opens
up a whole can of security worms (so if it gets done it'll be post-1.0).

So for the moment, you'll have to set your repository defaults by hand.  Or
you could create a version-controlled file named darcs_defaults and add to
your makefile something like

_darcs/prefs/defaults: darcs_defaults
    cp $< $@

(it would be better to be a bit more clever and take into account the case
where the code is compiled from tarball and _darcs isn't present...)
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list