Bug 3476 - culture-data return wrong values
Summary: culture-data return wrong values
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-15 14:16 UTC by Sebastien Pouliot
Modified: 2012-09-02 13:35 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Sebastien Pouliot 2012-02-15 14:16:04 UTC
$ cat hk.cs 
using System;
using System.Globalization;

class Program {
	static void Main ()
	{
		var r = new RegionInfo ("HK");
		Console.WriteLine ("Name: '{0}'", r.Name);
		Console.WriteLine ("ThreeLetterWindowsRegionName: '{0}'", r.ThreeLetterWindowsRegionName);
	}
}

$ mcs hk.cs 

$ mono hk.exe 
Name: ''
ThreeLetterWindowsRegionName: 'Hong Kong S.A.R., China'


^ under Windows / MS.NET that would give 'HK' and 'HKG'


$ mono --version
Mono JIT compiler version 2.10.9 (tarball Tue Feb 14 20:23:29 EST 2012)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       normal
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          debugger softdebug 
	LLVM:          yes(2.9svn-mono)
	GC:            Included Boehm (with typed GC)


MonoTouch (confirmed) and M4A (likely) inherits the wrong values.
Comment 1 Sebastien Pouliot 2012-02-15 14:23:41 UTC
mono master has the same issue


$ mono --version
Mono JIT compiler version 2.11 (master/97d4af9 Tue 29 Nov 2011 17:37:34 EST)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            Included Boehm (with typed GC)

$ mono hk.exe 
Name: ''
ThreeLetterWindowsRegionName: 'Hong Kong S.A.R., China'
Comment 2 Duncan Mak 2012-02-15 14:32:24 UTC
Is this related to this comment made 19 days ago?

https://github.com/mono/mono/commit/383e3da5673a2287cd7ddb932eeb59e3130123c8#commitcomment-910428
Comment 3 Miguel de Icaza [MSFT] 2012-02-15 14:58:51 UTC
That is a patch to the database provider.
Comment 4 Sebastien Pouliot 2012-02-16 20:48:25 UTC
Fixes committed (master, mono-2-10 and mobile-master). 
Mismatch between native and managed representation of RegionInfo (borked since 2007).
Comment 5 Miguel de Icaza [MSFT] 2012-09-02 13:35:05 UTC
Closing fixed bug.