test1.py # -*- coding: euc-jp -*- s = 'あいうえお' print s test2.py # -*- coding: euc-jp -*- s = 'あいうえお' print unicode(s, 'euc-jp').encode('Shift_JIS') test3.py # -*- coding: euc-jp -*- us = u'あいうえお' print us print us.encode('Shift_JIS') test4.py # -*- coding: euc-jp -*- s = 'あいうえお' print s print unicode(s, 'euc-jp').encode('Shift_JIS') IronPython の結果 C:\>ironpythonconsole test1.py あいうえお C:\>ironpython