[code]#!/usr/bin/python
# -*- coding: utf-8 -*-
print “中文”[/code]
输出
[code]涓枃[/code]
看了一下帮助,eclipse console default的encoding是GBK,需要设置console的encoding为utf-8方法
Console encoding
The console can be configured to display output using a character encoding different from the default encoding. To set the console encoding for an application, use the Console Encoding settings on the Common tab of a launch configuration.