[Mono-devel-list] culture info patches

Jackson Harper jackson at ximian.com
Tue Mar 16 03:49:19 EST 2004

Here is a semi-finished set of patches to our CultureInfo
implementation. These patches move the data into the runtime so ICU is
not needed. The data is generated from the open18n xml files and the
generator is configurable so we can easily "patch" data without editing
the existing xml files (so we can stay in sync easily). I was able to do
a full bootstrap (in en_CA, and en_US) and run xsp with these patches

I've only included a small subset of the generated data to keep the
patch small and to make testing a little easier. cultures supported are
en_CA, en_US, es_ES, and ja_JP. I also haven't included the
locale-builder tool.

To use the existing CultureInfo w/ICU implementation instead of the new
one you can set the env var MONO_ICU_CULTURE_INFO to TRUE.

There is still some work to do but feedback is appreciated.


- Still not getting all the data into tables, lots of String.Emptys
right now
- Only generate the CultureMap in CultureInfo.cs for supported cultures
- Make generated tables more prettier
- Add headers to Makefile.am

icall.c: New icall for constructing CultureInfo's from lcid.
locales.c: Fill in CultureInfo objects from culture table data.
culture-info.h: CultureInfo data structs. Each culture info entry has an
index into the number format table, and the date time format table
unless the entry is a neutral culture, then it has -1 for its indexes.
culture-info-tables.h: Generated locale data. This file is generated by

CultureInfo.cs: Construct culture infos using the new from_lcid method
unless an env var is set.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CultureInfo.cs.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040316/2beca1cd/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: culture-info-tables.h
Type: text/x-c-header
Size: 2760 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040316/2beca1cd/attachment-0001.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: metadata.patches
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040316/2beca1cd/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: culture-info.h
Type: text/x-c-header
Size: 2058 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040316/2beca1cd/attachment-0002.bin 

More information about the Mono-devel-list mailing list