Just use the example shiped with IronPython9.0.

Add a class named Embed5

////////////////////////////////////////////////////////////////////////////////////////////
public class Embed5
{
    //the file to be executed
    const string fileName = @"D:/TestChinese.py";

    public static void Run()
    {
        PythonEngine engine = new PythonEngine();
        engine.ExecuteFile(fileName);
        Application.Run();
    }
}
//////////////////////////////////////////////////////////////////////////////////////////////
And content of TestChinese.py is

##########################################

from System import *
from System.Windows.Forms import *
MessageBox.Show("你好,IronPython")

#########################################

in Program.cs add "Embed5.Run();"

while i run this example, the string "你好" can't be correctly displayed.

but if i use IronPythonConsole to execute  MessageBox.Show("你好,IronPython"),
it works fine



2005/8/11, Martin Maly <[EMAIL PROTECTED]>:
Would it be possible for you to send us a short code snippet that you had problem with? I would like to find out whether the problem is in parsing, encoding usage, etc.
 
Martin


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of ??
Sent: Wednesday, August 10, 2005 9:22 AM
To: users-ironpython.com@lists.ironpython.com
Subject: [IronPython] language Support-Chinese

it seems that ironpython does not support chinese.
 
i used ironpython in one project
 
and tried to display some information in chinese ,
 
but these words can't be correctly displayed.
 
i wonder if u could kindly give me some advice on sovling this problem.
 

_______________________________________________
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com





--
The shift of focus (to patterns) will
have a profound and enduring effect
on the way we write programs.
        --Ward Cunningham and Ralph Johnson
_______________________________________________
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to