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


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


发表回复

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