pydev在eclipse里面的输出中文乱码的解决方案


#!/usr/bin/python
# -*- coding: utf-8 -*-
print "中文"

输出

涓枃

看了一下帮助,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.


发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据