I've just got an email about an interesting problem with NHibernate. After searching for a little while, I came up with the conclution that the problem is in the framework, and I can't see an easy solution for it.
First, let's start by explaining Turkish locale & its unique interpretation of the humble i letter. This MSDN article does it best, so I'll let them do the job:
How does it has anything to do with NHibernate? Well, consider this code:
This code will fail to return anything if the locale is set to Turkish. And the problem is worse because there doesn't seem to be a way to pass an InvariantCulture or Ordinal to the GetField method. The only solution that I can see now if to get all the fields on the method and iterate over them one by one, making a culture insensitive comparision.
Please tell me that I'm missing something, since this seems to indicate that any Reflection code will likely break if you're using the Turkish locale.
Oh, and that is the behavior for both .Net 1.0 & .Net 2.0