Ar an triochadú lá de mí Iúil, scríobh Stephen J. Turnbull:
Just a comment:
>>>>> "Aidan" == Aidan Kehoe <kehoea(a)parhasard.net>
writes:
+ /* Control 0; treat as punctuation */
+ SET_RANGE_SYNTAX(0, 32, Spunct);
+ /* DEL plus Control 1 */
+ SET_RANGE_SYNTAX(127, 159, Spunct);
There really oughtta be a better way, don't you think? We really
ought to have an Scntrl class. (Not seriously suggesting doing
something about it now, that's obviously a can of worms.)
By the way, what's the logic for Spunct? Something like, these are
clearly word boundaries, but they can't be whitespace because we don't
want them "catenating up" with "real" whitespace?
More like, they’re not whitespace, and GNU have gone for punctuation. Weak,
I know.
Why is ASCII SPACE included in the Control 0 range? That's
neither
useful nor correct; SPACE is a graphic character (even though it's not
printing, or maybe I have that distinction backwards, my ISO standards
are at the office).
I copied the range from the existing code, to make the chance of something
going wrong smaller; it actually doesn’t matter, since we make it whitespace
a couple of lines down.
ECMA-006.pdf says:
“6.2 Control characters
The control characters of the C0 set shall be represented by bit
combinations as specified in annex A. [so, 0-31 inclusive.]
6.3 Character SPACE
The acronym of the character SPACE is SP and it is represented by bit
combination 2/0.
This character is a graphic character, it has a visual representation
consisting of the absence of a graphic symbol.
6.4 Graphic characters
The 94 bit combinations 2/1 to 7/14 are used for the representation of
graphic characters as specified in 6.4.1, 6.4.2 and 6.4.3.
All graphic characters shall be spacing characters, that is, they
cause the active position to advance by one character position.”
(That does raise the question of whether double-width characters are graphic
characters, which I don’t really want to deal with right now.)
--
Santa Maradona, priez pour moi!