I came across the word 'The Turkey Test' while learning about code testing. I don't know really what it means.

What is Turkey Test? Why is it called so?


The Turkey problem is related to software internationalization or simply to its misbehavior in various language cultures.

In various countries there are different standards, for example for writing dates (14.04.2008 in Turkey and 4/14/2008 in US), numbers (i.e. 123,45 in Poland and 123.45 in USA) and rules about character uppercasing (like in Turkey with letters i, I and ı).

As Jeff Moser pointed below one such problem was pointed out by a Turkish user who found a bug in the ToUpper() function. There are more details in comments below.

However the problem is not limited to Turkey and to string conversions.

For example, in Poland and many other countries, dates and numbers are also written in a different manner.

Some links from a Google search for the Turkey Test :

  • Does Your Code Pass The Turkey Test? by Jeff Moser
  • What's Wrong With Turkey? by Jeff Atwood

Here is described the turkey test

Forget about Turkey, this won't even pass in the USA. You need a case insensitive compare. So you try:

String.Compare(string,string,bool ignoreCase):

....

Do any of these pass "The Turkey Test?"

Not a chance!

Reason: You've been hit with the "Turkish I" problem.

As discussed by lots and lots of people, the "I" in Turkish behaves differently than in most languages. Per the Unicode standard, our lowercase "i" becomes "İ" (U+0130 "Latin Capital Letter I With Dot Above") when it moves to uppercase. Similarly, our uppercase "I" becomes "ı" (U+0131 "Latin Small Letter Dotless I") when it moves to lowercase.


We write dates smaller to bigger like dd.MM.yyyy: 28.10.2010

We use '.'(dot) for thousands separator, and ','(comma) for decimal separator: 4.567,9

We have ö=>Ö, ç=>Ç, ş=>Ş, ğ=>Ğ, ü=>Ü, and most importantly ı=>I and i => İ; in other words, lower case of upper I is dotless and upper case of lower i is dotted.

People may have very stressful times because of meaningless errors caused by the above rules.

If your code properly runs in Turkey, it'll probably work anywhere.


The so called "Turkey Test" is related to Software internationalization. One problem of globalization/internationalization are that date and time formats in different cultures can differ on many levels (day/month/year order, date separator etc).

Also, Turkey has some special rules for capitalization, which can lead to problems. For example, the Turkish "i" character is a common problem for many programs which capitalize it in a wrong way.