On Sat, Nov 04, 2006 at 11:27:49PM +0100, Abdelrazak Younes wrote:

> Enrico Forestieri wrote:
> > On Sat, Nov 04, 2006 at 11:03:16AM -0000, [EMAIL PROTECTED] wrote:
> > 
> >> Author: younes
> >> Date: Sat Nov  4 12:03:14 2006
> >> New Revision: 15728
> >>
> >> URL: http://www.lyx.org/trac/changeset/15728
> >> Log:
> >> Convert to unicode.
> >>
> >> Modified:
> >>     lyx-devel/trunk/src/mathed/MathParser.C
> >>
> >> Modified: lyx-devel/trunk/src/mathed/MathParser.C
> >> URL: 
> >> http://www.lyx.org/trac/file/lyx-devel/trunk/src/mathed/MathParser.C?rev=15728
> >> ==============================================================================
> >> --- lyx-devel/trunk/src/mathed/MathParser.C (original)
> >> +++ lyx-devel/trunk/src/mathed/MathParser.C Sat Nov  4 12:03:14 2006
> >> @@ -213,11 +213,19 @@
> >>    catInvalid     // 15   <delete>
> >>  };
> >>  
> >> -CatCode theCatcode[256];
> >> -
> >> -
> >> -inline CatCode catcode(unsigned char c)
> >> -{
> >> +CatCode theCatcode[128];
> > 
> > This is wrong because \catcode works on 8-bit numbers. Please, change
> > the 128 to 256.
> 
> Hum, as I understand it does not matter within our context if \catcode 
> works on 8 bits or not. This CatCode table is just here to classify 
> between the TeX catcodes, they are not really the catcode themselves 
> (except for the 128 first catcodes that is).
> 
> If you are sure that there is at least one catcode greater than 128 is 
> classified as something other than catOther, I'll do the change. But 
> from what I read about TeX catcode since then, I doubt it.

Maybe you are right as, from what I can see, only the catcode of '@' is
ever changed in the LyX sources. However, if proper support for catcodes
will be implemented, we should mimic what TeX does, and TeX can deal
with 256 characters and not 128 as the comment you added implies -- please
change that. Quoting the very beginning of chapter 7 in the TeXbook:

  There are 256 characters that TeX might encounter at each step,
  in a file or in a line of text typed directly on your terminal.
  These 256 characters are classified into 16 categories numbered
  0 to 15.

I think that we should leave the 256, but if you and others don't agree,
then please also make the corresponding changes to texparser.C

-- 
Enrico

Reply via email to