Click here to Skip to main content
Click here to Skip to main content

Is Turkish the only locale with unusual capitalization?

By , 30 Dec 2012
 

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 />
"ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToLower().Equals("abcdefghijklmnopqrstuvwxyz")

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.

License

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

About the Author

Ivan Krivyakov
Architect Sungard Consulting Services
United States United States
Member
Ivan is a hands-on software architect working for SunGard Consulting, 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: www.ikriv.com.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionInteresting...memberJohnny J.7 Jan '13 - 21:49 
QuestionSome morememberMihai Nita30 Dec '12 - 11:18 
AnswerRe: Some more [modified]memberIvan Krivyakov30 Dec '12 - 15:29 
GeneralRe: Some morememberbitterskittles9 Jan '13 - 4:42 
GeneralMy vote of 5membermascix30 Dec '12 - 9:46 

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

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