turkish-i problem : CultureInfo « I18N Internationalization « C# / CSharp Tutorial






using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Text;
using System.Threading;
using System.Globalization;

public class MainClass
{
    public static void Main()
    {
        CultureInfo[] cultures = new CultureInfo[] {
            CultureInfo.GetCultureInfo("en-US"),
            CultureInfo.GetCultureInfo("tr-TR")
        };

        char lower = 'i';
        char upper = 'I';

        foreach (CultureInfo culture in cultures)
        {
            Thread.CurrentThread.CurrentCulture = culture;
            Console.WriteLine("{0}", culture.DisplayName);

            char toUpper = Char.ToUpper(lower);
            Console.WriteLine("  Lower->Upper: {0} ({1:X}) -> {2} ({3:X})",lower, (int)lower, toUpper, (int)toUpper);

            char toLower = Char.ToLower(upper);
            Console.WriteLine("  Upper->Lower: {0} ({1:X}) -> {2} ({3:X})",upper, (int)upper, toLower, (int)toLower);
        }
    }
}
English (United States)
  Lower->Upper: i (69) -> I (49)
  Upper->Lower: I (49) -> i (69)
Turkish (Turkey)
  Lower->Upper: i (69) -> ? (130)
  Upper->Lower: I (49) -> ? (131)








21.1.CultureInfo
21.1.1.Create CultureInfo: de-DE
21.1.2.Get current Culture
21.1.3.Create CultureInfo: en-US
21.1.4.Get CultureInfo from data type
21.1.5.Germany culture
21.1.6.Russian culture
21.1.7.Enumerates all available cultures
21.1.8.Get the current and current-ui cultures
21.1.9.Change the current cultures to Mexican Spanish
21.1.10.Create a CultureInfo object for the nl-BE culture
21.1.11.turkish-i problem
21.1.12.Format decimal for different CultureInfo