[darcs-users] blue color bug

Peter "Firefly" Lund firefly at diku.dk
Mon Jul 5 01:08:20 UTC 2004

On Mon, 5 Jul 2004, Tommy Pettersson wrote:

> I don't know so much about insane/complicated encodings,
> but use of multi-char sequence encodings could possibly
> defeat isPrint.  Does this apply to UTF8?


> I think that setting the locale should be the way to tell
> darcs how to interpret the files.

This is equivalent to (almost) blind output, except that there will
(hopefully) be some filtering to sift out escape and control codes.

This can become more complicated than it would seem, because some of the
Asian encodings/charsets use escape codes all the time, so /those/ escape
codes can't actually be filtered out, only other escape codes that would
move the cursor around on the screen, redefine function keys, change to an
unreadable character set bank for the ordinary (Western) letters, etc.

This is probably not want you want.

It is also something that would raise lots of red flags during a security
review (which I believe is necessary before 1.0).

> This is how any other program, like the viewer, editor and compiler and
> of course the shell and terminal, would have to interpret the files.

No.  Not all of them.  gedit can use just about any encoding.  Moreover,
this can be changed on a per-file basis.  gedit also has pretty good
autodetection of the encoding when you open a file.  The rest of gnome
uses UTF8 (because that is the proper thing to do).

Gnome does not use the locale for this.  The file manager (Nautilus)
assumes all filenames are in UTF8 but if they clearly aren't, it will
fallback to trying to convert from "whatever the current locale is" to

> By changing the locale, all of these programs should change
> their interpretation of the files in the repo.

This is a really, really bad idea.  It should be bound to the repository
(*wherever it might be hosted*), not to whatever locale one user currently
has set for some of his/her programs.


More information about the darcs-users mailing list