Click here to Skip to main content
12,953,230 members (68,301 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 30 Dec 2012

Is Turkish the only locale with unusual capitalization?

, 30 Dec 2012 Apache
Rate this:
Please Sign up or sign in to vote.
Is Turkish the only locale with unusual capitalization?

It is well known in some circles that Turkish locale has unusual capitalization rules that may break otherwise solid code (e.g. see here: “Turkish Java Needs Special Brewing“).

In a nutshell, we take it for granted that upper case of “i” is “I”, and lower case of “I” is “i”. This is not true in Turkish where upper case of i is dotted İ, and lower case of I is dotless ı. This may have looked like a clever idea in the 1920s, but it sometimes causes a lot of grief in the 21st century.

I was wondering: is Turkish the only locale that has “strange” capitalization rules?

To answer this, first let’s define what is “normal”. As code, unless specifically localized, mostly deals with 26 letters of the Latin alphabet, I define “normal” as

"abcdefghijklmnopqrstuvwxyz".ToUpper().Equals("ABCDEFGHIJKLMNOPQRSTUVWXYZ") &&<br />

I wrote a little program in C# that does the “normality” test for each culture defined in the system. It turns out that on my machine out of 354 defined cultures the following exhibit unusual behavior:

az, az-Latn, az-Latn-AZ, tr, tr-TR

All of them are varieties of Turkish and Azerbaijani locales, and the anomaly is limited to the i/I pair. Azerbaijan used Cyrillic script until independence from the Soviet Union, and then in 1991 switched to a slightly extended version of the Turkish alphabet, inheriting the i/I anomaly.


This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


About the Author

Ivan Krivyakov
Technical Lead Thomson Reuters
United States United States
Ivan is a hands-on software architect/technical lead working for Thomson Reuters in the New York City area. At present I am mostly building complex multi-threaded WPF application for the financial sector, but I am also interested in cloud computing, web development, mobile development, etc.

Please visit my web site:

You may also be interested in...

Comments and Discussions

QuestionInteresting... Pin
Johnny J.7-Jan-13 21:49
memberJohnny J.7-Jan-13 21:49 
QuestionSome more Pin
Mihai Nita30-Dec-12 11:18
memberMihai Nita30-Dec-12 11:18 
AnswerRe: Some more Pin
Ivan Krivyakov30-Dec-12 15:29
memberIvan Krivyakov30-Dec-12 15:29 
GeneralRe: Some more Pin
bitterskittles9-Jan-13 4:42
memberbitterskittles9-Jan-13 4:42 
GeneralMy vote of 5 Pin
mascix30-Dec-12 9:46
membermascix30-Dec-12 9:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170525.1 | Last Updated 30 Dec 2012
Article Copyright 2012 by Ivan Krivyakov
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid