中文注释和程序中添加中文按照网上的操作在首行添加#coding=gbk后结果还出现问题
geany软件,python3.6
# coding=gbk
name = "ada lovelace"
print(name.title())
print(name.lower())
print(name.upper())
first_name = "ada"
last_name = "lovelace"
full_name = first_name + " " + last_name
message = "hellow," + full_name.title() + "!"
print("hellow," + full_name.title() + "!")
print(message)
#啦啦
print("\t啦啦")
print("Languages:\n\tC\n\tPython\n\tJava")
先出现
File "hellow_world.py", line 14
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
在最前面添加了
#coding=gbk
后结果出现这个错误
File "hellow_world.py", line 1
SyntaxError: encoding problem: gbk
这个问题怎么解决啊?