Skip to content

Instantly share code, notes, and snippets.

@fdeitelhoff
Created February 14, 2013 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fdeitelhoff/4953341 to your computer and use it in GitHub Desktop.
Save fdeitelhoff/4953341 to your computer and use it in GitHub Desktop.
Simple console application to identify cultures with different capitalization rules.
static void Main()
{
const string lowerCharacters = "abcdefghijklmnopqrstuvwxyz";
const string upperCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
foreach (var culture in cultures)
{
var upper = lowerCharacters.ToUpper(culture);
var lower = upperCharacters.ToLower(culture);
if (upperCharacters != upper || lowerCharacters != lower)
{
Console.WriteLine(culture.Name);
}
}
Console.WriteLine();
Console.WriteLine("Total cultures: {0}", cultures.Length);
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment