Changed ToLower/ToUpper to culture-insensitive ToLowerInvariant/ToUpperInvariant.
Merge pull request #2857 from Andreyul/ToLower_ToUpper

Changed ToLower/ToUpper to culture-insensitive ToLowerInvariant/ToUpperInvariant