Received: from webgate.proteosys.de (mail.proteosys-ag.com [62.225.9.49]) by lucy.proteosys (8.11.0/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id f1BFX0H11479 for ; Sun, 11 Feb 2001 16:33:04 +0100 Received: by webgate.proteosys.de (8.11.0/8.11.0) with ESMTP id f1BFX0d25408 . for ; Sun, 11 Feb 2001 16:33:00 +0100 Received: from mail.Uni-Mainz.DE (mailserver1.zdv.Uni-Mainz.DE [134.93.8.30]) by mailgate2.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f1BFWx713208 for ; Sun, 11 Feb 2001 16:32:59 +0100 (MET) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0943F.EC9DF800" Received: from mailgate1.zdv.Uni-Mainz.DE (mailgate1.zdv.Uni-Mainz.DE [134.93.8.56]) by mail.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id QAA10898 for ; Sun, 11 Feb 2001 16:32:59 +0100 (MET) Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f1BFWvM00876 for ; Sun, 11 Feb 2001 16:32:57 +0100 (MET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <0.BD3030FE@mail.listserv.gmd.de>; Sun, 11 Feb 2001 16:32:50 +0100 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 487602 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Sun, 11 Feb 2001 16:32:54 +0100 Received: from ix.urz.uni-heidelberg.de (mail.urz.uni-heidelberg.de [129.206.119.234]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id QAA20269 for ; Sun, 11 Feb 2001 16:32:52 +0100 (MET) Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by ix.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id QAA05844 for ; Sun, 11 Feb 2001 16:32:52 +0100 Received: from moutvdom01.kundenserver.de (moutvdom01.kundenserver.de [195.20.224.200]) by relay.uni-heidelberg.de (8.10.2+Sun/8.10.2) with ESMTP id f1BFWpu04131 for ; Sun, 11 Feb 2001 16:32:51 +0100 (MET) Received: from [195.20.224.208] (helo=mrvdom01.schlund.de) by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2) id 14RyUX-0006bC-00 for LATEX-L@urz.uni-heidelberg.de; Sun, 11 Feb 2001 16:32:45 +0100 Received: from manz-3e3645d3.pool.mediaways.net ([62.54.69.211] helo=istrati.zdv.uni-mainz.de) by mrvdom01.schlund.de with esmtp (Exim 2.12 #2) id 14RyUZ-00029v-00 for LATEX-L@URZ.UNI-HEIDELBERG.DE; Sun, 11 Feb 2001 16:32:47 +0100 Received: (from latex3@localhost) by istrati.zdv.uni-mainz.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id QAA11929; Sun, 11 Feb 2001 16:30:34 +0100 In-Reply-To: <14980.23750.628032.305093@gargle.gargle.HOWL> References: <200102091445.JAA00482@plmsc.psu.edu> <200102091643.RAA23818@mozart.ujf-grenoble.Fr> <14980.23750.628032.305093@gargle.gargle.HOWL> Return-Path: X-Mailer: VM 6.75 under Emacs 20.4.1 X-Authentication-Warning: istrati.zdv.uni-mainz.de: latex3 set sender to frank@mittelbach-online.de using -f Content-class: urn:content-classes:message Subject: LaTeX's internal char prepresentation (UTF8 or Unicode?) Date: Sun, 11 Feb 2001 16:30:34 +0100 Message-ID: <14982.45082.150652.74719@istrati.zdv.uni-mainz.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Frank Mittelbach" Sender: "Mailing list for the LaTeX3 project" To: "Multiple recipients of list LATEX-L" Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 3796 This is a multi-part message in MIME format. ------_=_NextPart_001_01C0943F.EC9DF800 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I think bringing UTF8 into the debate is an important idea (Karsten = already remarked on the existence of some support for it). In this mail I like = to explore the ideas a bit further on whether or not something like UTF8 or Unicode would be suitable, say, for LaTeX's internal character representation. I'm saying LaTeX's not TeX's, mind. TeX is 7bit with a parser that accepts 8bit but doesn't by default gives = it any meaning. On the other hand Omega is 16bit (or more these days?) and = could be viewed as internally using something like Unicode for representation. LaTeX might want to live on both or either of them. so its internal = character representation has to be independent of the low-level representation in = the formatter. As a recall: when i speak about LaTeX's internal character = representation I mean the way LaTeX internally passes characters around (as long as i = doesn't do typesetting). This representation is 7bit and consists of the visible = ASCII (which is represented by itself, eg A as "A") and of anything else which = is represented as, what is sometimes referred to as "font encoding specific commands". These are things like \"a or \textyen, etc (right now roughly = 900+ are defined). These font encoding specific commands might look like TeX commands but with respect to the internal representation you better view = them as abstract names for characters as they will get passed around = unchanged, eg in marks or when written to files etc. Only when finally something is getting typeset they will get associated = with font slot positions or with complicated maneuvers to position accents = above or below other characters etc. you find the concepts and ideas behind this being described in a talk i = gave in Brno which can be found at http://www.latex-project.org in the = article section. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Now for what Marcel wrote as a summary: > I am aware that some of these demands cannot really be met within > Knuthian TeX, but it seems LaTeX3 is prepared to eventually go beyond > TeX. So it may be useful to define a minimal set of required > extensions/changes, as this issue could be a major roadblock to > enlarging the developer base. For example, is there much motivation > for anybody to clean up the hyphenation mess before a clean long-term > solution (not just a work-around) is agreed on? The LaTeX internal character representation is a 7bit representation not = an 8bit one as UTF8. As such it is far less likely to be mangled by = incorrect conversion if files are exchanged between different platforms. I have = yet to see that UTF8 text (without taking precaution and externally announcing = that a file is in UTF8) is really properly handled by any OS platform. Is it? however, there is also the following question: wouldn't it be better if the internal LaTeX representation would be = Unicode in one or the other flavor? in other words, instead of using \"a as the representation for umlaut-a = use something like \unicode{00e4} or \uc00e4 % (as a command) or \utfviii{...} note that i deliberately had something start with a \ here. why is this needed? because you need to get back into control at various points and this is only possible if the whole construct can be viewed as a command as far as the underlying formatter is concerned. Using Omega this could probably handled differently but will have to perform reasonably on TeX as well so i don't see any other suitable way = to present the internal form. Also with TeX visible ASCII is basically = forced to be represented by itself which is another restriction. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D now what would be the advantages/disadvantages of the above approach? - clary the above approach will give a better naming scheme since = unicode is an accepted standard and as such well-defined. - however, not clear is that the resulting names are easier to read, eg \unicode{00e4} viz \"a. - with intermediate forms like data written to files this could be a = pain and people in Russia, for example, already have this problem when they = see something like \cyr\CYRA\cyrn\cyrn\cyro\cyrt\cyra\cyrc\cyri\cyrya. = In case of unicode as the internal representation this would be true for all languages (except English) while currently the Latin based ones are = still basically okay. - the current latex internal representation is richer than unicode for = good or worse, eg \" is defined individually as representation for = accenting the next char, which means that anything = \" is automatically also a member of it, eg \"g. - the latter point could be considered bad since it allows to produce characters not in unicode but independently of what you feel about = that the fact itself as consequences when defining mappings for font encodings. right now, one specifies the accents, ie = \DeclareTextAccent\" and for those glyphs that exists as composites one also specifies the composite, eg \DeclareTextComposite{\"}{T1}{a}{...} With the unicode approach as the internal representation there would = be an atomic form ie \unicode{00e4} describing umlaut-a so if that has = no representation in a font, eg in OT1, then one would need to define = for each combination the result. - anything else? i don't really think so and this mail is already = getting rather long :-) so how does this all balance? i guess the first point is quite important = and helpful since it also means that translating unicode based documents = into the internal form gets rather trivial and the strange set of names within = current LaTeX internal character representation (all of which are basically = historical accidents and thus without much structure) is clearly far from optimal. But does it otherwise currently actually provides any advantage over the current situation? (other than better hiding that we couldn't deal with = 99% of the unicode characters if they would appear in a document) in 1992/3 when we worked on shaping the ideas of the LaTeX internal representation we actually did discuss similar ideas but back then = abandoned them because of resource constraints (in the software). Machines are = nowadays bigger and faster so this isn't really much of an argument there. So... time for another attempt? comments? frank ------_=_NextPart_001_01C0943F.EC9DF800 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable LaTeX's internal char prepresentation (UTF8 or = Unicode?)

I think bringing UTF8 into the debate is an important = idea (Karsten already
remarked on the existence of some support for it). In = this mail I like to
explore the ideas a bit further on whether or not = something like UTF8 or
Unicode would be suitable, say, for LaTeX's internal = character
representation. I'm saying LaTeX's not TeX's, = mind.

TeX is 7bit with a parser that accepts 8bit but = doesn't by default gives it
any meaning. On the other hand Omega is 16bit (or = more these days?) and could
be viewed as internally using something like Unicode = for representation.

LaTeX might want to live on both or either of them. so = its internal character
representation has to be independent of the low-level = representation in the
formatter.

As a recall: when i speak about LaTeX's internal = character representation I
mean the way LaTeX internally passes characters = around (as long as i doesn't
do typesetting). This representation is 7bit and = consists of the visible ASCII
(which is represented by itself, eg A as = "A") and of anything else which is
represented as, what is sometimes referred to as = "font encoding specific
commands". These are things like \"a or = \textyen, etc (right now roughly 900+
are defined). These font encoding specific commands = might look like TeX
commands but with respect to the internal = representation you better view them
as abstract names for characters as they will get = passed around unchanged, eg
in marks or when written to files etc.

Only when finally something is getting typeset they = will get associated with
font slot positions or with complicated maneuvers to = position accents above or
below other characters etc.

you find the concepts and ideas behind this being = described in a talk i gave
in Brno which can be found at http://www.latex-project.org = in the article
section.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Now for what Marcel wrote as a summary:

 > I am aware that some of these demands = cannot really be met within
 > Knuthian TeX, but it seems LaTeX3 is = prepared to eventually go beyond
 > TeX.  So it may be useful to define a = minimal set of required
 > extensions/changes, as this issue could be = a major roadblock to
 > enlarging the developer base.  For = example, is there much motivation
 > for anybody to clean up the hyphenation = mess before a clean long-term
 > solution (not just a work-around) is = agreed on?

The LaTeX internal character representation is a 7bit = representation not an
8bit one as UTF8. As such it is far less likely to be = mangled by incorrect
conversion if files are exchanged between different = platforms. I have yet to
see that UTF8 text (without taking precaution and = externally announcing that a
file is in UTF8) is really properly handled by any OS = platform. Is it?


however, there is also the following question:

 wouldn't it be better if the internal LaTeX = representation would be Unicode
 in one or the other flavor?

in other words, instead of using \"a as the = representation for umlaut-a use
something like

   \unicode{00e4}
or \uc00e4        = % (as a command)
or \utfviii{...}

note that i deliberately had something start with a \ = here. why is
this needed? because you need to get back into = control at various points
and this is only possible if the whole construct can = be viewed as a
command as far as the underlying formatter is = concerned.
Using Omega this could probably handled differently = but will have to
perform reasonably on TeX as well so i don't see any = other suitable way to
present the internal form. Also with TeX visible = ASCII is basically forced to
be represented by itself which is another = restriction.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

now what would be the advantages/disadvantages of the = above approach?

 - clary the above approach will give a better = naming scheme since unicode is
   an accepted standard and as such = well-defined.

 - however, not clear is that the resulting names = are easier to read, eg
   \unicode{00e4} viz \"a.

 - with intermediate forms like data written to = files this could be a pain and
   people in Russia, for example, already = have this problem when they see
   something like = \cyr\CYRA\cyrn\cyrn\cyro\cyrt\cyra\cyrc\cyri\cyrya.  In case
   of unicode as the internal = representation this would be true for all
   languages (except English) while = currently the Latin based ones are still
   basically okay.

 - the current latex internal representation is = richer than unicode for good
   or worse, eg \" is defined = individually as representation for accenting the
   next char, which means that anything = \"<base-char-in-the-internal-reps> is
   automatically also a member of it, eg = \"g.

 - the latter point could be considered bad since = it allows to produce
   characters not in unicode but = independently of what you feel about that the
   fact itself as consequences when = defining mappings for font
   encodings. right now, one specifies the = accents, ie \DeclareTextAccent\"
   and for those glyphs that exists as = composites one also specifies the
   composite, eg = \DeclareTextComposite{\"}{T1}{a}{...}
   With the unicode approach as the = internal representation there would be
   an atomic form ie  \unicode{00e4} = describing umlaut-a so if that has no
   representation in a font, eg in OT1, = then one would need to define for each
   combination the result.

 - anything else? i don't really think so and = this mail is already getting
   rather long :-)

so how does this all balance? i guess the first point = is quite important and
helpful since it also means that translating unicode = based documents into the
internal form gets rather trivial and the strange set = of names within current
LaTeX internal character representation (all of which = are basically historical
accidents and thus without much structure) is clearly = far from optimal.

But does it otherwise currently actually provides any = advantage over the
current situation? (other than better hiding that we = couldn't deal with 99% of
the unicode characters if they would appear in a = document)

in 1992/3 when we worked on shaping the ideas of the = LaTeX internal
representation we actually did discuss similar ideas = but back then abandoned
them because of resource constraints (in the = software). Machines are nowadays
bigger and faster so this isn't really much of an = argument there.

So... time for another attempt?

comments?

frank

------_=_NextPart_001_01C0943F.EC9DF800--