monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] second go at i18n spec


From: Nathaniel Smith
Subject: Re: [Monotone-devel] second go at i18n spec
Date: Tue, 9 Dec 2003 04:05:23 -0800
User-agent: Mutt/1.5.4i

On Mon, Dec 08, 2003 at 06:01:35PM -0500, graydon hoare wrote:
>   character set conversion:
> 
>     the process of mapping a string of bytes representing wide
>     characters from one encoding to another.  conversion is specified
>     by a lua hook "char_conv" which takes a filename and returns a
>     table of two strings: the first represents the "internal"
>     (database) charset, the second represents the "external"
>     (filesystem) charset.
> 
>   line ending conversion:
> 
>     the process of converting platform-dependent end-of-line codes
>     (0x0D, 0x0A, or the pair 0x0D 0x0A) from one convention to
>     another. conversion is specified by a lua hook "line_conv" which
>     takes a filename and returns a table of two strings: the first
>     represents the "internal" (database) line ending convention, the
>     second represents the "external" (filesystem) line ending
>     convention. each string should be one of the three strings "CR",
>     "LF", or "CRLF". if line ending conversion is always performed
>     after character set conversion, when both are enabled.

I still feel like these should be hooked on file attributes, not hooks
that process filenames?  Am I being dumb somehow?

> 7. cert values:
> 
>   - cert values may be either text or binary, depending on the return
>     value of the hook "cert_is_binary". if binary, the cert value is
>     never printed to the screen (the literal string "<binary>" is
>     displayed, instead) , and is never altered or character
>     converted. if text, the cert value is subject to normal form
>     conversion, as well as having all UTF-8 codes corresponding to
>     ASCII control codes (0x0..0x1F and 0x7F) prohibited in the normal
>     form, except 0x0A (LF).

Would it be better to have a cert be a three-tuple (key, binaryp, value)?

I worry with this that you get weird behaviour if two people have
hooks that disagree -- what happens if I get a binary cert but don't
update my hook appropriately; presumably monotone will notice at some
point that the cert is invalid as a text cert and choke, but how and
when does that happen?

-- Nathaniel

-- 
"But suppose I am not willing to claim that.  For in fact pianos
are heavy, and very few persons can carry a piano all by themselves."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]