Subject: Re: Suggestion regarding the classification of the characters.

From: "Richard A. O'Keefe" <[email-masked]>
Date: Mon, 12 Jun 2000 10:59:19 +1200 (NZST)

The intent of C/UNIX locales and their aspects such as LC_ALL
LC_MESSAGES LC_MONETARY LC_COLLATE LC_TIME LC_NUMERIC LC_CTYPE
is so that a program can adapt its *data* handling.

To set the *syntax* of the programming language from the locale
is a bad idea.  There are plenty of excellent reasons why Quintus
Prolog decoupled its data character classification predicates
from its syntax tables.

Instead of everyone coming up with their own ideas about which characters
are "more like alpha" and which characters are "more like punct", let's
appeal to unidata*.txt.  For example, the SUPERSCRIPT DIGIT characters
are classified as 'Nd'.  That way we'll all have the _same_ way of
classifying characters, and be able to share code and data.

It could be quite simple.  Prolog should use the number and
identifier syntax spelled out in the Unicode book, and should
accept a
:- text_encoding(<coded character set name>).
directive at the top of a file to tell it how the bytes in the
file map to Unicode characters.  (ISO 2022 is the official mechanism
for things like that, but for something like a source file, it is better
to be readable.)