1 #!/usr/bin/env python 2 #coding:utf-8 3 4 msg="我爱北京天安门" 5 6 print(msg.encode(‘utf-8‘)) 7 8 print((msg.encode(‘utf-8‘)).decode(‘utf-8‘))
时间: 2025-01-06 19:22:32
1 #!/usr/bin/env python 2 #coding:utf-8 3 4 msg="我爱北京天安门" 5 6 print(msg.encode(‘utf-8‘)) 7 8 print((msg.encode(‘utf-8‘)).decode(‘utf-8‘))