[Mono-dev] [PATCHES] Bug 480178 - System.Globalization.CharUnicodeInfo.GetUnicodeCategory() does not handle surrogate characters appropriately.

Damien Diederen dd at crosstwine.com
Mon May 17 14:35:14 EDT 2010


Hi Miguel,

Miguel de Icaza <miguel at novell.com> writes:
> Hello,
>
>> This approach grows the category data table from 64 to ~70kB, and
>> requires an additional 8kB index for the astral planes.  The resulting
>> runtime produces the same results as Microsoft's v2.0.50727 and
>> v3.5.21022 for the whole Unicode range, but has no support for v4.
>> 
>> Would that be an acceptable overhead?
>
> I think this is acceptable overhead;   I would like to have an option to
> turn off the astral planes if possible.

That can certainly be done.  I suppose you envision a compile-time
switch?  Is there already such an option/flag/preprocessor symbol I
should use as a model?

>> Would supporting v4.0.30319 be worth it at an additional cost of ~78kB
>> of data (which shouldn't be faulted in) in the Mono binary?
>
> If you are up for it, I would love to support the 4.0 code as well, as
> our next release will be a big push for 4.0 support (this will be our
> new default).

Sure.  I guess this means some more compile-time conditionalization of
the runtime; corlib can just pass a version parameter at class init time
as in v3 of my patches:

#if NET_4_0
		private const int CategoryDataVersion = 4;
#else
		private const int CategoryDataVersion = 2;
#endif

(Alternative suggestions are of course welcome.)

> Is your Linear + bi-level patch available in Bugzilla?

I just uploaded v4:

  https://bugzilla.novell.com/show_bug.cgi?id=480178#c35

> Miguel.

Cheers, -D

-- 
http://crosstwine.com
tel:  +49 21 89 29 39
cell: +49 174 34 89 428

“Strong Opinions, Weakly Held”
                 — Bob Johansen


More information about the Mono-devel-list mailing list