Displaying Korean text

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.
 
S

simida

I think you should set Console current code page If you want to output
text in the console window.

Hope it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top