Bug 40138 - new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase): key not found in czech locale
Summary: new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase): key not fou...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 9.6 (iOS 9.3)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: (C7)
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2016-04-06 01:11 UTC by Dominik Weber
Modified: 2016-06-08 20:22 UTC (History)
5 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 Developer Community or GitHub 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:
VERIFIED FIXED

Description Dominik Weber 2016-04-06 01:11:52 UTC
When setting the device language to czech the following code does NOT work:

            var n1 = "SEARCHFIELDS";
            var n2 = "Searchfields";

            var same = string.Equals(n1, n2, StringComparison.OrdinalIgnoreCase);

            var dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
            dict[n1] = "test";
            var x = dict[n2];

Expected result: same==true, x=="test"
Actual result: same==true, x==KeyNotFound exception

when switching the device language to US the code works perfectly.
Comment 1 Dominik Weber 2016-04-06 01:12:08 UTC
=== Xamarin Studio Business ===

Version 5.10.3 (build 51)
Installation UUID: 41e280a4-905a-4da3-8344-9e359d932db3
Runtime:
	Mono 4.2.3 (explicit/832de4b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402030004

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.6.1.9 (Xamarin Business)
Hash: 5f11db8
Branch: master
Build date: 2016-03-25 21:26:55-0400

=== Xamarin.Android ===

Version: 6.0.3.5 (Xamarin Business)
Android SDK: /Users/dominikweber/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 510030051
Git revision: f3c0d982165f785772d125f02668370d929014fb
Build date: 2016-03-24 18:51:31-04
Xamarin addins: ee5cfd3ecb6b20de47c1d25efb9a9abc101e8ce7
Build lane: monodevelop-lion-cycle6-c6sr3

=== Operating System ===

Mac OS X 10.11.2
Darwin Dominik-MacBook-Air.fritz.box 15.2.0 Darwin Kernel Version 15.2.0
    Fri Nov 13 19:56:56 PST 2015
    root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Comment 2 Sebastien Pouliot 2016-04-07 18:58:48 UTC
This fails on XI 9.6.x (c6) which is based on mono 4.2.x.

But it works on XI 9.8 (c7) and maccore/master - both using mono 4.4.x.

So it looks like it was a mono issue that has already been fixed. I'll add your code snippet into our test suite to ensure it cannot regress again. Thanks!
Comment 3 Sebastien Pouliot 2016-04-07 19:11:32 UTC
QA: unit test added in

maccore/master d580bb2b30ec9c65e9aaa98889e5cd1697027d78
maccore/cycle7 a833fac2964f1e8b7cebe275646ce2260571ab70
Comment 5 Dominik Weber 2016-06-08 20:22:44 UTC
I can confirm this is fixed in xamarin ios 9.8