[Mono-dev] set culture uses serialization?
Robert Jordan
robertj at gmx.net
Sat Jan 5 14:32:12 EST 2008
Steve,
this is by design.
The GC error you encountered during the deserialization of CultureInfo
was fixed in 1.2.6.
Robert
Steve Bjorg wrote:
> I spoke too soon. I tested on an old version mistakenly. 1.2.6 has
> now Korean and Konkani. Sweet! I updated our languages page.
>
> That only leaves the issue with using serialization when setting
> CurrentCulture. Is that by design or a bug? If by design, what is
> the recommended pattern for supporting difference cultures on
> different threads?
>
> - Steve
>
> --------------
> Steve G. Bjorg
> http://wiki.mindtouch.com
> http://wiki.opengarden.org
>
>
> On Jan 5, 2008, at 7:15 AM, Steve Bjorg wrote:
>
>> Korean culture cannot be instantiated as
>> new CultureInfo("ko-kr")
>> throws an exception stating it's not implemented.
>>
>> There is work item filed to be update the locale builder:
>> https://bugzilla.novell.com/show_bug.cgi?id=324483
>>
>>
>> There are other cultures missing as well. The following code
>> instantiates all 134 cultures lists in the attached file.
>>
>> using System;
>> using System.Globalization;
>>
>> namespace CultureCheck {
>> class Program {
>> static void Main(string[] args) {
>> if(System.IO.File.Exists("cultures.txt")) {
>> string[] cultures = System.IO.File.ReadAllLines
>> ("cultures.txt");
>> int failed = 0;
>> int succeeded = 0;
>> foreach(string culture in cultures) {
>> try {
>> CultureInfo info = new CultureInfo
>> (culture.Trim());
>> string now = DateTime.UtcNow.ToString
>> (info.DateTimeFormat);
>> ++succeeded;
>> } catch {
>> ++failed;
>> Console.WriteLine(culture);
>> }
>> }
>> Console.WriteLine("Tested {0} cultures: {1}
>> succeeded, {2} failed", succeeded + failed, succeeded, failed);
>> } else {
>> Console.Error.WriteLine("MISSING FILE: cultures.txt");
>> }
>> }
>> }
>> }
>>
>>
>> Only 26 out of 134 cultures fail on mono 1.2.6:
>> az-cyrl-az
>> az-latn-az
>> dv-mv
>> en-bz
>> en-029
>> en-jm
>> en-tt
>> fr-mc
>> ka-ge
>> de-li
>> kk-kz
>> kok-in
>> ko-kr
>> ky-kg
>> ms-bn
>> ms-my
>> mn-mn
>> pa-in
>> sa-in
>> sr-cyrl-cs
>> sr-latn-cs
>> syr-sy
>> tt-ru
>> ur-pk
>> uz-cyrl-uz
>> uz-latn-uz
>>
>> List of missing cultures is also available here (highlighted in
>> yellow): http://wiki.opengarden.org/Deki_Wiki/Languages
>>
>> Some of these should be trivial as they are identical to existing
>> ones:
>> * English (Belize)
>> * English (Caribbean)
>> * English (Jamaica)
>> * English (Trinidad and Tobago)
>> * French (Monaco)
>> * German (Liechtenstein)
>>
>> Others are likely more complicated. Of those, a high-priority
>> culture is Korean.
>>
>>
>> - Steve
>>
>> --------------
>> Steve G. Bjorg
>> http://wiki.mindtouch.com
>> http://wiki.opengarden.org
>>
>>
>> On Jan 4, 2008, at 10:47 PM, Miguel de Icaza wrote:
>>
>>>> This issue and the fact that Korean isn't supported for CultureInfo
>>>> are blockers for a large customer deployment of ours. Is there any
>>>> way these issues can be addressed? Who is working on CultureInfo?
>>> What seems to be the problem with Korean?
>>>
>>> Please provide a stack trace, a bug report, or a sample program that
>>> fails with Korean.
>>>
>>> Miguel.
>>>
>>>
>>> <cultures.txt>
More information about the Mono-devel-list
mailing list