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

Sessions in Seville

"I end my journey in front of the tomb of Columbus, located inside the world’s largest Gothic cathedral."

Vineyards of southern France

"Not far from Sauternes is the village of Saint-Émilion, also a famous wine region but what got me hooked was their impressive limestone caves."

Roaming the cobblestones of Istanbul

"Inside the church there are still traces of rune inscriptions made during the Viking age by Varangians, an elite guard made up of Scandinavian immigrant warriors."

Conquering Machu Picchu

"A life-long dream came true this morning, as I stood upon the mountain looking down at Machu Picchu. I felt like some strange mix between Indiana Jones and a small boy, gazing down upon the final treasure of the Incas."

Having champagne in Champagne

"We roamed the damp and chilly tunnels and stumbled upon a large barrel delivered by Napoleon himself."

Visions of Singapore

"By extensive use of landfill with sand bought from Indonesia and Cambodia, the bay area has expanded greatly in the last few years and tall buildings pop up everywhere."