Mink Machine

Turkish culture issues in .NET

I came across a very fishy bug which seemed to occur only for Turkish locales. It turned out that case sensitivity was the culprit and both Rick Strahl and Scott Hanselman had written about the issue a few months ago. The Turkish alphabet seems to have different meanings for upper and lower case versions of the letter “I”.

As soon as I had regrown all the hair I previously ripped off in utter frustration, I found the bug quite fascinating. To avoid the problem, you might try something like this:

myString.ToLower(System.Globalization.CultureInfo.InvariantCulture)

Sure, software development is supposed to be hard and all, but these kinds of weird bugs are just insane. If you’re feeling adventurous, switch your browser to Turkish and see what happens with your code. You might not like the result but it sure is an eye-opener on the importance of software internationalization and the need for defensive coding.

Comments

No comments yet.

Post a comment

Your email address will not be published. Required fields are marked *

Featured stories

The lakes of Lombardy

"The town of Como, largest settlement around Lake Como, attracts a lot of people with big wallets. But I preferred to take the funicular up the mountain to the Brunate region, where you get a much better view of the lake."

Aliens in Nevada and New Mexico

"We turned around and went down another dirt road, past countless Joshua trees until our car was covered in dirt and we finally arrived at the Front Gate of Area 51."

Historic locations in Gothenburg

"Hundreds of houses were quickly build, but unfortunately all of it was burned to the ground in 1611 by Danish forces."

Wazzup in Vaduz

"Vaduz Castle is overlooking the town from a hill, a short walk from the center. It’s really a postcard view with the alps in the background, which I’m sure the prince enjoys as he sips his morning coffee while towering above his loyal subjects."

Roaming in Valletta

"I passed the statue of Jean de Valette, the 49th Grand Master who laid the foundation stone to Valletta in 1566, to gaze at the golden interior of St. John’s Co-Cathedral, where he is buried in the crypt."

New Years Eve in Sydney

"Opera House is seen in front of the massive fireworks in the harbor area, celebrating the 75th anniversary of the Harbour Bridge."