G
Guest
In a windows form application(C#) I have to support international font(say
Korean)
For this application uses a resource file that contains korean text.
I set the current UI culture as below
// Override the default user culture with the neutral culture
System.Threading.Thread.CurrentThread.CurrentUICulture =
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo(""); // Force the default culture
string NewCulture = Console.ReadLine();
// Switch to the desired culture
c = new System.Globalization.CultureInfo(NewCulture, false);
System.Threading.Thread.CurrentThread.CurrentUICulture = c;
Then using Resource Manager I retrive the data from resource and try to print
// Get a resource manager
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager("HelloWorld.Resources.MyResources",
System.Reflection.Assembly.GetExecutingAssembly());
// Print out the "HelloWorld" resource string
Console.WriteLine(resources.GetString("HelloWorld"));
It seems instaed of printing Korean text it prints ??????
However in the debugger I could able to see the Korean text.
ANy help in this regard is highly appreciated.
Thanks.
Korean)
For this application uses a resource file that contains korean text.
I set the current UI culture as below
// Override the default user culture with the neutral culture
System.Threading.Thread.CurrentThread.CurrentUICulture =
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo(""); // Force the default culture
string NewCulture = Console.ReadLine();
// Switch to the desired culture
c = new System.Globalization.CultureInfo(NewCulture, false);
System.Threading.Thread.CurrentThread.CurrentUICulture = c;
Then using Resource Manager I retrive the data from resource and try to print
// Get a resource manager
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager("HelloWorld.Resources.MyResources",
System.Reflection.Assembly.GetExecutingAssembly());
// Print out the "HelloWorld" resource string
Console.WriteLine(resources.GetString("HelloWorld"));
It seems instaed of printing Korean text it prints ??????
However in the debugger I could able to see the Korean text.
ANy help in this regard is highly appreciated.
Thanks.