French characters, other 'special' characters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

French characters, other 'special' characters

Michael Sperberg-McQueen
Jean Veronis adverts to a vexed problem of long standing, and one for
which the TEI does provide what I think is a good solution, which is in
fact documented in the current draft of the guidelines, though perhaps
not as clearly as it ought to be.  This note, too, will not be the clear
short tutorial JV asks for -- clarity, brevity, and accuracy oppose each
other fiercely when character sets come up.  But I can at least describe
the TEI version 1.0 solution and why it is what it is.

The background to the problems of French and other national characters
as well as other 'special' characters, is described in section 3.1 of
the guidelines, in particular 3.1.5 (problems in using any existing
character set for interchange) and 3.1.7 (methods now in use in various
schemes for representing characters not present in a given character set
or subset).

The specific character-set recommendations of the TEI in the current
draft (version 1.1 -- this is unchanged from 1.0) are in section 3.2,
and the specific passage Jean Veronis is looking for is in sections
3.2.2 and 3.2.3.  These say that for the present, at least, only
characters in the "ISO 646 subset" should be used for interchange of
documents intended to be fully TEI-conformant, and that SGML entity
references or a transliteration scheme should be used to represent any
characters of the text not present in the ISO 646 subset.

The list of standard character sets is not now connected to the rules
for TEI-conformant interchange, because in real life the sender and
receive do not control the mechanisms of their interchange and so cannot
guarantee that standard sets will arrive in a usable state.  Writing
System Declarations will be prepared for the standard and commonly used
character sets listed, and so will not need to be prepared by
individuals, but at present the only use of the writing system
declaration is to document a character set whether used locally or in
interchange, and to drive a packing/unpacking process which will replace
characters which don't travel well with corresponding entity
declarations, or replace entity declarations with the proper local
characters.  The draft does say that the WSD is not integrated into
the DTDs yet; it doesn't talk about driving the packer/unpacker.

The ISO 646 subset contains the following (non-national) characters
which do not commonly cause misinterpretation of the data when shipped
across networks, from ASCII to EBCDIC machines or vice versa, or across
national boundaries:

    a b c d e f g h i j k l m n o p q r s t u v w x y z
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
    0 1 2 3 4 5 6 7 8 9
    " % & ' ( ) * + , - . / : ; < = > ? _

and space.

Transliteration schemes like the Beta code of the Thesaurus Linguae
Graecae are thus legal in interchange (if they transcribe into the ISO
646 subset), but for French it is far better to use the publicly
documented SGML entities of ISO 8879, section D.4.  These are what Jean
Veronis uses in his sample, and fears he will not be able to sell
people:  &eacute; for e with acute, etc.

If I were trying to sell this solution to people, I would make the
following points, not necessarily in this order:

1 this is for interchange, *not* for local processing:  I would look at
Jean's last name as V)ronis on my screen locally, not as 'Veronis' or
'V&eacute;ronis' or V\'eronis, and change to the interchange form just
before the data left my CPU to go to the network.  The recipient might
well translate from the interchange form into whatever local form is
desired, before even looking at the file.

2 this *works* for interchange, which is more than can be said for many
other possible approaches.  If I sent a file containing JV's example, it
would arrive anywhere on this net in readable form.  If I sent the same
file containing the characters in the proper form for display on my
system, it would look like real French when it left me, but like this
when it arrived on your system -- and while I don't know exactly what
this will look like, I am willing to bet no one on this list will see
the accents as they should be (unless we have a few cross-subscribers from
the ISO8859 list):

    La linguistique informatique mod)lise les ph$nom$nes
    li)s N l'interpr)tation et N la production du
    langage, de mani$re N etc.

Among the techniques which don't work well for interchange are

    - using an existing 8-bit character set's representation
      of the characters.  IBM PCs use character 82 (hex) or 130
      (decimal) for e-acute, but this typically arrives after net
      transfer as character 02, which is a control character and
      might have unexpected results.  The Mac uses 8E for this
      character, which may arrive as 0E (14), another control
      character, this one dangerous because it means 'switch
      to alternate character set'.  Even if they arrive as 82 or 8E,
      these characters are unlikely to be understood correctly on
      a different machine without documentation of the source
      character set, which is not standard in file transfer today.
      IBM mainframes use, some of them, the codes I sent above.
      The network software seldom knows about these ...
    - using the French standard 7-bit character set or its EBCDIC
      equivalent.  This will often arrive unmolested, even after
      ASCII-EBCDIC translation, but not if the text crosses a
      national boundary.  How many readers outside of France
      recognize JV's name in the string "V{ronis"?
      (In some countries, this string will be clearly not quite right.
      In others, the e-acute will have been replaced with some other
      possible vowel, and the error will be hard to detect.)
    - using commonly defined but not *standard* solutions like TeX's
      codes -- backslash is a national character, which does not
      always cross national boundaries, and does not always cross
      ASCII/EBCDIC boundaries safely either.  Also, doubly delimited
      strings like SGML entity references are less ambiguous and
      thus safer than half-delimited strings like TeX codes.

3 Because the entity names of ISO 8879 D.4 are long and cumbersome, we
can subsitute shorter names for them if we wish, by making appropriate
declarations in our document type declaration.  (The current draft of
the guidelines doesn't go into this, in part because we're not sure how
great an idea this is.  The Oxford version of the DOE corpus of Old
English, however, does use its own entity names for eth, thorn, etc.
rather than keeping the long and cumbersome ones defined in ISO 8879.)

4 Because the SGML entity reference is a general-purpose tool, it is
not optimized for French.  That makes it seem clumsy.  It also ensures
that unlike many other tools it will not conflict with solutions for
German, Danish, and Spanish, or even with solutions for Greek, Cyrillic,
and Hebrew.

Once again now:

    - Interchange, not necessarily local processing.
    - Entity references work, and few alternatives do.
    - Entities can be made less cumbersome whenever it pays to do so.
    - Entities are a general-purpose tool.

Of these, the most important, I think, is that the solution provided
works and works reliably with every network connection or other method
of file transfer now known to me or to anyone on the character set

I should also point out that the issue of character handling has had
some of the most thoughtful and voluminous commentary thus far received,
and the work group on character sets may well decide eventually to
change the rules for 'TEI-conformant' interchange to allow eight-bit
interchange, and separate the ISO 646 subset or some similar mechanism
into a separate recommendation for cases where the network is unknown or
is known not to support eight-bit data transfer.  Those with opinions
would do well to make them known to this list or to the head of the work
group, Harry Gaylord (galiard @

Michael Sperberg-McQueen

Reply | Threaded
Open this post in threaded view

RE: French characters, other 'special' characters

Michael Sperberg-McQueen comments correctly that "among the techniques which
don't work well for interchange are... using an existing 8-bit character set's
representation of the characters".

It may be of marginal interest to note that the public domain file transfer
program Kermit uses (since version 3, I think) the ISO8859-1 character set,
and will do its best to translate to ISO8859-1 at the sending end and from
ISO8859-1 at the receiving end. Thus, any character which is common to the
sender's and receiver's character set and to ISO8859-1 should go through
alright, and the particularly horrific examples given will be avoided.

I very much hope that the situation will rapidly progress to the point where
manufacturers will offer ISO8859-1 as standard, and TEI can then recommend
it instead of a restricted ASCII, which admittedly is all that we can be
sure of at the moment.

Ciara/n O/ Duibhi/n.