python2.7;解决中文无法正常显示问题

版权声明:本文为博主原创文章,未经博主允许欢迎转载。 https://blog.csdn.net/LANGZI7758521/article/details/50986989
# coding=utf-8  #第一行添加,以下8种写法,默认ascii编码所以要重定义编码格式以支持中文
# coding= utf-8
# encoding=utf-8
# encoding= utf-8
# -*- coding: utf-8 -*-
# -*- coding:utf-8 -*-
# -*- encoding: utf-8 -*-
# -*- encoding:utf-8 -*-
# 注意python 对空格敏感以下为错误写法
# coding = utf-8
# coding =utf-8
# encoding = utf-8
# encoding =utf-8
# -*- coding : utf-8 -*-
# -*- coding :utf-8 -*-
# -*- encoding : utf-8 -*-
# -*- encoding :utf-8 -*-
print "中文"
# 输出:
# 中文
# 请按任意键继续. . .


展开阅读全文

没有更多推荐了,返回首页