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.
> +
> +
> +inline CatCode catcode(lyx::char_type c)
> +{
> + /* The fact that we use unicode internally does not change Knuth's TeX
> + engine. It is still 7bit only, not even latin1 or something like that.
> + Therefore, the catcode table needs only to have 128 entries.
> + Everything not in that range is catOther.
> + */
> + if (c >= 128)
Here, too. And the comment should also be corrected accordingly.
--
Enrico